Skip to content

Commit

Permalink
Fix git issue with prerelease job
Browse files Browse the repository at this point in the history
Currently the prerelease job fails with:
```
error: The following untracked working tree files would be overwritten by checkout:
	nix-installer-aarch64-darwin
	nix-installer-aarch64-linux
	nix-installer-i686-linux
	nix-installer-x86_64-darwin
	nix-installer-x86_64-linux
```
https://github.com/NixOS/experimental-nix-installer/actions/runs/11708583897/job/32610685871

This is because assemble_installer.py adds those files on main, but then
the job tries to checkout prerelease.

Instead, fetch and checkout the prerelease branch in
assemble_installer.py before creating those files.
  • Loading branch information
mkenigs committed Nov 19, 2024
1 parent 5335fd1 commit 5a1803c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/release-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ jobs:
with:
commit_message: "Update installer script"
commit_user_name: "GitHub Actions"
branch: prerelease
branch: prerelease
# assemble_installer.py already does a fetch and checkout
skip_fetch: true
skip_checkout: true
3 changes: 3 additions & 0 deletions assemble_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
else:
sys.exit(0)

subprocess.run("git fetch origin prerelease", check=True)
subprocess.run("git checkout -b prerelease origin/prerelease", check=True)

for installer_url, system in installers:
shutil.copy(f"{installer_url}/bin/nix-installer", f"nix-installer-{system}")

0 comments on commit 5a1803c

Please sign in to comment.