Skip to content

Commit

Permalink
Add --dry-run arg to upload_to_github.sh and update hackage.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Nov 15, 2023
1 parent 2c1740a commit 54d92ec
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 46 deletions.
168 changes: 122 additions & 46 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions upload_to_github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

set -e

for arg do
shift

[ "$arg" = "--dry-run" ] && DRY_RUN=t && continue
done

BUILT=$(nix build .#ghc945-static-github --no-link --json | jq -r '.[0].outputs.out')
echo "Built:"
ls -lh "$BUILT"
Expand All @@ -15,6 +21,12 @@ ARTIFACT_LINUX_ARCHIVE="$ARTIFACT_LINUX.tar.gz"
# Smoke check
$ARTIFACT_LINUX --help 2>&1 > /dev/null
echo "Got artifact: $ARTIFACT_LINUX"
if [[ -n "$DRY_RUN" ]]; then
exit $?
fi
TAG=v"$VERSION"
echo "Tagging at $TAG"
git tag "$TAG" -f
Expand Down

0 comments on commit 54d92ec

Please sign in to comment.