git.iko.soy/rowtype-yoga/purescript-docs-search
on master help sign in
24 lines 595 B history raw
1#!/usr/bin/env bash
3set -euo pipefail
5# Please use this script to cut new releases.
6# It will create a tag and push it, which will trigger CI to create a release,
7# build release files, push them to the release, and publish a new version on NPM
9NEW_TAG=v$(jq -r ".version" package.json)
11# Fail if the new tag already exists
12if git rev-parse "${NEW_TAG}" >/dev/null 2>&1; then
13 echo "Tag '${NEW_TAG}' already exists, please bump the version in package.json";
14 exit 1;
15fi
17echo "Creating and pushing new tag '${NEW_TAG}'.."
19git tag "${NEW_TAG}"
21git push origin "${NEW_TAG}"
23echo "Done."