Skip to content

Commit be5cfb4

Browse files
authored
Fix release script quoting (#32)
Since it isn't quoted, the default value "" for testing_hydra_eval_id gets swallowed. Handle no args in assemble_installer.py as well just to be less lazy.
1 parent d028660 commit be5cfb4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/release-script.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
- uses: cachix/install-nix-action@v25
1818
- name: Create draft release
1919
# The script also depends on gh and git but those are both pre-installed on the runner
20-
run: nix-shell -p python3Packages.requests --run "python assemble_installer.py ${{ github.event.inputs.testing_hydra_eval_id }}" -I nixpkgs=channel:nixos-23.11
20+
run: nix-shell -p python3Packages.requests --run 'python assemble_installer.py "${{ github.event.inputs.testing_hydra_eval_id }}"' -I nixpkgs=channel:nixos-23.11
2121
env:
2222
GH_TOKEN: ${{ github.token }}

assemble_installer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
# string to use latest eval on Hydra
1313
# TODO: using an empty string is not the cleanest
1414
# TODO: print script usage
15-
eval_id = sys.argv[1]
15+
# TODO: argparse or something
16+
if len(sys.argv) < 2:
17+
eval_id = None
18+
else:
19+
eval_id = sys.argv[1]
1620

1721
response = requests.get('https://hydra.nixos.org/jobset/experimental-nix-installer/experimental-installer/evals', headers={'Accept': 'application/json'})
1822
evals = response.json()['evals']

0 commit comments

Comments
 (0)