mirror of
https://github.com/rowtype-yoga/purescript-docs-search.git
synced 2024-09-11 12:35:37 +03:00
25 lines
595 B
Bash
Executable File
25 lines
595 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
# Please use this script to cut new releases.
|
|
# It will create a tag and push it, which will trigger CI to create a release,
|
|
# build release files, push them to the release, and publish a new version on NPM
|
|
|
|
NEW_TAG=v$(jq -r ".version" package.json)
|
|
|
|
# Fail if the new tag already exists
|
|
if git rev-parse "${NEW_TAG}" >/dev/null 2>&1; then
|
|
echo "Tag '${NEW_TAG}' already exists, please bump the version in package.json";
|
|
exit 1;
|
|
fi
|
|
|
|
echo "Creating and pushing new tag '${NEW_TAG}'.."
|
|
|
|
git tag "${NEW_TAG}"
|
|
|
|
git push origin "${NEW_TAG}"
|
|
|
|
echo "Done."
|
|
|