1
1
mirror of https://github.com/primer/css.git synced 2024-11-14 14:38:16 +03:00
css/script/is-prerelease
2019-01-04 10:34:53 -08:00

15 lines
364 B
Bash
Executable File

#!/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