git.iko.soy/rowtype-yoga/package-sets
on psc-0.14.7-20220303 help sign in
52 lines 1.2 kB history raw
1#!/usr/bin/env bash
3set -euo pipefail
5# Please use this script to cut new releases. It will generate a new tag name
6# based on the current date, update the latest releases file, and push the tag
8# Fail if we are not on trunk
9BRANCH=$(git branch --show-current)
10if [ "${BRANCH}" != "master" ]; then
11 echo "Please checkout master branch";
12 exit 1;
13fi
14git pull
16LATEST_PURS="0.14.7"
18NEW_STABLE_TAG="psc-${LATEST_PURS}"
20# Create the first tag for the compiler if it doesn't exist
21if git rev-parse "${NEW_STABLE_TAG}" >/dev/null 2>&1; then
22 echo "Stable tag '${NEW_STABLE_TAG}' already exists, skipping";
23else
24 echo "Creating and pushing new tag '${NEW_STABLE_TAG}'.."
25 git tag "${NEW_STABLE_TAG}";
26 git push origin "${NEW_STABLE_TAG}";
27fi
29NEW_TAG="psc-${LATEST_PURS}-`date +'%Y%m%d'`"
31# Fail if the new tag already exists
32# Note: exit status of the command is the conditional
33if git rev-parse "${NEW_TAG}" >/dev/null 2>&1; then
34 echo "Tag '${NEW_TAG}' already exists!";
35 exit 1;
36fi
38echo "Creating and pushing new tag '${NEW_TAG}'.."
40./update-latest-compatible-sets.sh "${NEW_TAG}"
42git add latest-compatible-sets.json
44git commit -m "Update to the latest tag"
46git push
48git tag "${NEW_TAG}"
50git push origin "${NEW_TAG}"
52echo "Done."