@@ -1707,6 +1707,34 @@ class DeleteDebCommand(BaseCommand):
1707
1707
self .logger .info ('done.' )
1708
1708
1709
1709
1710
+ class AddDebCommand (BaseCommand ):
1711
+
1712
+ name = 'add-deb'
1713
+ desc = 'Use the specified debian package for the deployment, rather than creating a new one'
1714
+
1715
+ def update_arguments (self , parser ):
1716
+ parser .add_argument ('path' ,
1717
+ help = 'Path to the deb package to add.' )
1718
+ parser .add_argument ('-l' , '--link' , action = 'store_true' ,
1719
+ help = '''"Link" the package to the deployment via a cache entry, but
1720
+ do not copy it into the deployment files. I.e. use it in-place.''' )
1721
+
1722
+ def run (self , args ):
1723
+ self .logger .info (f'Adding { args .path } to the deployment...' )
1724
+
1725
+ path = args .path
1726
+ if not args .link :
1727
+ dest_path = os .path .join (args .cache_dir , os .path .basename (path ))
1728
+ self .logger .debug (f'copying { path } to { dest_path } ...' )
1729
+ shutil .copyfile (path , dest_path )
1730
+ path = dest_path
1731
+
1732
+ self .logger .debug ('updating deployment cache...' )
1733
+ self .cache ['deb' ] = path
1734
+
1735
+ self .logger .info ('done.' )
1736
+
1737
+
1710
1738
class CreateVpcStack (BaseCommand ):
1711
1739
name = 'create-vpc-stack'
1712
1740
desc = 'create stack setting up the VPC, subnets and associated routing for Veraison services'
@@ -2332,8 +2360,6 @@ class DeleteSignerKeyCommand(BaseCommand):
2332
2360
2333
2361
self .logger .info ('Done.' )
2334
2362
2335
- # }}} commands
2336
-
2337
2363
2338
2364
class Port (int ):
2339
2365
def __init__ (self , val ):
0 commit comments