1
1
mirror of https://github.com/primer/css.git synced 2024-09-21 21:58:42 +03:00

add standalone pre-release check script

This commit is contained in:
Shawn Allen 2019-01-02 16:43:18 -08:00
parent 438380f07b
commit 46d8fd945b

14
script/is-prerelease Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
head=$(git symbolic-ref --short HEAD)
branch=${TRAVIS_PULL_REQUEST_BRANCH:-$head}
expected=${branch/release-/}
actual=$(jq -r .version modules/primer/package.json)
echo "branch: 'release-$expected' vs. primer/package.json '$actual'"
if [[ "$expected" = "$actual" ]]; then
echo "+ match!"
exit 0
else
echo "x mismatch."
exit 1
fi