Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Installs the given GardenLinux Python library
inputs:
version:
description: GardenLinux Python library version
default: "1.0.7"
default: "1.0.8"
python_version:
description: Python version to setup
default: "3.14"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gardenlinux"
version = "1.0.7"
version = "1.0.8"
description = "Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames"
authors = ["Garden Linux Maintainers <contact@gardenlinux.io>"]
license = "Apache-2.0"
Expand Down
1 change: 1 addition & 0 deletions src/gardenlinux/github/release/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def get_parser() -> argparse.ArgumentParser:

upload_parser.add_argument(
"--release-id",
type=int,
required=True,
help="GitHub release ID to upload the file to (required).",
)
Expand Down
24 changes: 6 additions & 18 deletions tests/github/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def test_script_upload_needs_github_token(
"--repo",
"gardenlinux",
"--release-id",
TEST_GARDENLINUX_RELEASE_MINOR,
"1",
"--file",
str(artifact_for_upload),
"--dry-run",
Expand Down Expand Up @@ -192,7 +192,7 @@ def test_script_upload_dry_run(
)

m.get(
f"//api.github.com:443/repos/gardenlinux/gardenlinux/releases/tags/{TEST_GARDENLINUX_RELEASE_MINOR}",
"//api.github.com:443/repos/gardenlinux/gardenlinux/releases/1",
json=RELEASE_JSON,
status_code=200,
)
Expand All @@ -208,7 +208,7 @@ def test_script_upload_dry_run(
"--repo",
"gardenlinux",
"--release-id",
TEST_GARDENLINUX_RELEASE_MINOR,
"1",
"--file",
str(artifact_for_upload),
"--dry-run",
Expand Down Expand Up @@ -245,17 +245,11 @@ def test_script_upload_inaccessible_file(
)

m.get(
f"//api.github.com:443/repos/gardenlinux/gardenlinux/releases/tags/{TEST_GARDENLINUX_RELEASE_MINOR}",
"//api.github.com:443/repos/gardenlinux/gardenlinux/releases/1",
json=RELEASE_JSON,
status_code=200,
)

m.post(
f"//uploads.github.com:443/repos/gardenlinux/gardenlinux/releases/{TEST_GARDENLINUX_RELEASE_MINOR}/assets?name=artifact.log",
text="{}",
status_code=201,
)

monkeypatch.setattr(
sys,
"argv",
Expand All @@ -267,7 +261,7 @@ def test_script_upload_inaccessible_file(
"--repo",
"gardenlinux",
"--release-id",
TEST_GARDENLINUX_RELEASE_MINOR,
"1",
"--file",
str(artifact_for_upload),
],
Expand Down Expand Up @@ -296,12 +290,6 @@ def test_script_upload(
status_code=200,
)

m.get(
f"//api.github.com:443/repos/gardenlinux/gardenlinux/releases/tags/{TEST_GARDENLINUX_RELEASE_MINOR}",
json=RELEASE_JSON,
status_code=200,
)

m.post(
"//uploads.github.com:443/repos/gardenlinux/gardenlinux/releases/1/assets?label=&name=artifact.log",
json={},
Expand All @@ -319,7 +307,7 @@ def test_script_upload(
"--repo",
"gardenlinux",
"--release-id",
TEST_GARDENLINUX_RELEASE_MINOR,
"1",
"--file",
str(artifact_for_upload),
],
Expand Down