From 7297b5341f943de74cb0c5d68d57cf3664747974 Mon Sep 17 00:00:00 2001 From: Ryan Ghods Date: Mon, 13 Apr 2020 11:52:51 -0700 Subject: [PATCH] Improve logic of extracting `BRANCH` in CI (to account for cases where branch name includes a folder e.g. `issue/3112`) --- scripts/e2e.npm.publish.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/e2e.npm.publish.sh b/scripts/e2e.npm.publish.sh index 474a50fc630..eef0f7bfbfb 100755 --- a/scripts/e2e.npm.publish.sh +++ b/scripts/e2e.npm.publish.sh @@ -47,9 +47,9 @@ npm-auth-to-token \ # Prep branch for Lerna's git-checks if [[ $GITHUB_REF = 'refs/pull/'* ]]; then - BRANCH=${GITHUB_HEAD_REF##*/} + BRANCH=${GITHUB_HEAD_REF#refs/pull/} else - BRANCH=${GITHUB_REF##*/} + BRANCH=${GITHUB_REF#refs/heads/} fi git checkout $BRANCH --