Skip to content

Commit a901724

Browse files
authored
Merge pull request #71 from agustinhenze/add-skip-contents-option-update
Add missing SkipContents option on publish-update endpoint
2 parents 2e2c05a + dae2a97 commit a901724

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

aptly_api/parts/publish.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def update(self, *, prefix: str, distribution: str,
132132
sign_skip: bool = False, sign_batch: bool = True, sign_gpgkey: Optional[str] = None,
133133
sign_keyring: Optional[str] = None, sign_secret_keyring: Optional[str] = None,
134134
sign_passphrase: Optional[str] = None, sign_passphrase_file: Optional[str] = None,
135+
skip_contents: Optional[bool] = False,
135136
skip_cleanup: Optional[bool] = False) -> PublishEndpoint:
136137
"""
137138
Example:
@@ -157,6 +158,8 @@ def update(self, *, prefix: str, distribution: str,
157158
body["ForceOverwrite"] = True
158159
if skip_cleanup:
159160
body["SkipCleanup"] = True
161+
if skip_contents:
162+
body["SkipContents"] = True
160163

161164
sign_dict = {} # type: Dict[str, Union[bool,str]]
162165
if sign_skip:

aptly_api/tests/test_publish.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ def test_update_snapshot_default_key(self, *, rmock: requests_mock.Mocker) -> No
292292
sign_passphrase="123456",
293293
sign_keyring="/etc/gpg-managed-keyring/pubring.pub",
294294
sign_secret_keyring="/etc/gpg-managed-keyring/secring.gpg",
295+
skip_contents=True,
295296
skip_cleanup=True
296297
),
297298
PublishEndpoint(

0 commit comments

Comments
 (0)