Skip to content

Commit

Permalink
Merge pull request #71 from agustinhenze/add-skip-contents-option-update
Browse files Browse the repository at this point in the history
Add missing SkipContents option on publish-update endpoint
  • Loading branch information
jdelic authored Oct 29, 2022
2 parents 2e2c05a + dae2a97 commit a901724
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aptly_api/parts/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions aptly_api/tests/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a901724

Please sign in to comment.