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