diff --git a/aptly_api/parts/publish.py b/aptly_api/parts/publish.py index b2a4866..1ffcee0 100644 --- a/aptly_api/parts/publish.py +++ b/aptly_api/parts/publish.py @@ -132,6 +132,7 @@ def update(self, *, prefix: str, distribution: str, sign_skip: bool = False, sign_batch: bool = True, sign_gpgkey: Optional[str] = None, sign_keyring: Optional[str] = None, sign_secret_keyring: Optional[str] = None, sign_passphrase: Optional[str] = None, sign_passphrase_file: Optional[str] = None, + skip_contents: Optional[bool] = False, skip_cleanup: Optional[bool] = False) -> PublishEndpoint: """ Example: @@ -157,6 +158,8 @@ def update(self, *, prefix: str, distribution: str, body["ForceOverwrite"] = True if skip_cleanup: body["SkipCleanup"] = True + if skip_contents: + body["SkipContents"] = True sign_dict = {} # type: Dict[str, Union[bool,str]] if sign_skip: diff --git a/aptly_api/tests/test_publish.py b/aptly_api/tests/test_publish.py index f536a43..b26f782 100644 --- a/aptly_api/tests/test_publish.py +++ b/aptly_api/tests/test_publish.py @@ -292,6 +292,7 @@ def test_update_snapshot_default_key(self, *, rmock: requests_mock.Mocker) -> No sign_passphrase="123456", sign_keyring="/etc/gpg-managed-keyring/pubring.pub", sign_secret_keyring="/etc/gpg-managed-keyring/secring.gpg", + skip_contents=True, skip_cleanup=True ), PublishEndpoint(