Skip to content

Commit

Permalink
Detect feature branches written with a different format (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi authored Jan 30, 2020
1 parent 273d119 commit c6320eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/publish-tfgen-package
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@ if [[ "${TRAVIS_OS_NAME:-}" == "linux" ]]; then

NPM_TAG="dev"

# We use the "features/" prefix on branches that we want to build and publish for doing
# cross repo work. But in this case, we don't want to publish over "dev", since the bits
# We use the "features/" and "feature-" prefix on branches that we want to build and publish for
# doing cross repo work. But in this case, we don't want to publish over "dev", since the bits
# could be totally busted and the dev tag tracks master.
if [[ "${TRAVIS_BRANCH:-}" == features/* ]]; then
NPM_TAG=$(echo "${TRAVIS_BRANCH}" | sed -e 's|^features/|feature-|g')
fi

if [[ "${TRAVIS_BRANCH:-}" == feature-* ]]; then
NPM_TAG=$(echo "${TRAVIS_BRANCH}")
fi

# If the package doesn't have a pre-release tag, use the tag of latest instead of
# dev. NPM uses this tag as the default version to add, so we want it to mean
# the newest released version.
Expand Down

0 comments on commit c6320eb

Please sign in to comment.