git.iko.soy/rowtype-yoga/package-sets
on master help sign in
Upgrade to purs 0.14.4 and improve release script (#996)
commit3db948211f1f23337576a30f0ccde6a34abc9ea4 authorFabrizio Ferrai <fabrizio.ferrai@gmail.com> dateThu 26 Aug 2021, 23:12 (5 years ago) parent03df43d
2 files changed+35−7
default.nix+2−2 release.sh+33−5
default.nix+2−2
@@ -7,8 +7,8 @@ let
77 pkgs.fetchFromGitHub {
88 owner = "justinwoo";
99 repo = "easy-purescript-nix";
10− rev = "bbef4245cd6810ea84e97a47c801947bfec9fadc";
11− sha256 = "00764zbwhbn61jwb5px2syzi2f9djyl8fmbd2p8wma985af54iwx";
10+ rev = "0679c8e8f7432bdcedb6de84266fdc651d59c401";
11+ sha256 = "13mbcgcfic6mxi84pkybbs427bbgyynnh4lvypv0x9c9nzkmna6m";
1212 }
1313 ) {
1414 inherit pkgs;
release.sh+33−5
@@ -1,16 +1,42 @@
1−#!/usr/bin/env nix-shell
2−#!nix-shell -i bash
1+#!/usr/bin/env bash
32
4−set -euxo pipefail
3+set -euo pipefail
54
65# Please use this script to cut new releases. It will generate a new tag name
76# based on the current date, update the latest releases file, and push the tag
87
9−# TODO: fail if there's a tag with this same name, as sometimes we publish more than one per day
8+# Fail if we are not on trunk
9+BRANCH=$(git branch --show-current)
10+if [ "${BRANCH}" != "master" ]; then
11+ echo "Please checkout master branch";
12+ exit 1;
13+fi
14+git pull
15+
16+LATEST_PURS="0.14.4"
17+
18+NEW_STABLE_TAG="psc-${LATEST_PURS}"
19+
20+# Create the first tag for the compiler if it doesn't exist
21+if git rev-parse "${NEW_STABLE_TAG}" >/dev/null 2>&1; then
22+ echo "Stable tag '${NEW_STABLE_TAG}' already exists, skipping";
23+else
24+ echo "Creating and pushing new tag '${NEW_STABLE_TAG}'.."
25+ git tag "${NEW_STABLE_TAG}";
26+ git push origin "${NEW_STABLE_TAG}";
27+fi
1028
11−LATEST_PURS="0.14.3"
1229NEW_TAG="psc-${LATEST_PURS}-`date +'%Y%m%d'`"
1330
31+# Fail if the new tag already exists
32+# Note: exit status of the command is the conditional
33+if git rev-parse "${NEW_TAG}" >/dev/null 2>&1; then
34+ echo "Tag '${NEW_TAG}' already exists!";
35+ exit 1;
36+fi
37+
38+echo "Creating and pushing new tag '${NEW_TAG}'.."
39+
1440./update-latest-compatible-sets.sh "${NEW_TAG}"
1541
1642git add latest-compatible-sets.json
@@ -22,3 +48,5 @@ git push
2248git tag "${NEW_TAG}"
2349
2450git push origin "${NEW_TAG}"
51+
52+echo "Done."