Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
resolves #2990 - regexp for the travis branch matching (#2991)
Browse files Browse the repository at this point in the history
* resolves #2990 - regexp for the travis branch matching

Signed-off-by: Matthew B White <[email protected]>

* move cf commands to original palce

Signed-off-by: Matthew B White <[email protected]>
  • Loading branch information
mbwhite authored and Simon Stone committed Dec 11, 2017
1 parent 8a05864 commit 8fc8b20
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
24 changes: 15 additions & 9 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if [ "${DOCS}" != "" ]; then
else
if [ "${TRAVIS_BRANCH}" = "master" ]; then
DOCS="latest"
elif [ "${TRAVIS_BRANCH}" = "v0.16.x" ]; then
elif [[ "${TRAVIS_BRANCH}" =~ v0\.16\.[0-9]{1,2} ]]; then
DOCS="stable"
fi
fi
Expand Down Expand Up @@ -130,6 +130,19 @@ else

# Grab the current version.
export VERSION=$(node -e "console.log(require('${DIR}/package.json').version)")

# process travis environment variables
if [ "${TRAVIS_BRANCH}" = "master" ]; then
PLAYGROUND_SUFFIX="-latest"
WEB_CFG="'{\"webonly\":true, \"analyticsID\" : \"UA-91314349-4\"}'"
elif [[ "${TRAVIS_BRANCH}" =~ v0\.16\.[0-9]{1,2} ]]; then
PLAYGROUND_SUFFIX=""
WEB_CFG="'{\"webonly\":true, \"analyticsID\" : \"UA-91314349-3\"}'"
else
echo "Unkown travis branch"
echo ${TRAVIS_BRANCH}
exit 1
fi

# Publish with latest tag (default). These are release builds.
echo "Pushing with tag latest"
Expand All @@ -155,14 +168,6 @@ else

# Push to public Bluemix.
pushd ${DIR}/packages/composer-playground

if [ "${TRAVIS_BRANCH}" = "master" ]; then
PLAYGROUND_SUFFIX="-latest"
WEB_CFG="'{\"webonly\":true, \"analyticsID\" : \"UA-91314349-4\"}'"
elif [ "${TRAVIS_BRANCH}" = "v0.16.x" ]; then
PLAYGROUND_SUFFIX=""
WEB_CFG="'{\"webonly\":true, \"analyticsID\" : \"UA-91314349-3\"}'"
fi
cf login -a https://api.ng.bluemix.net -u ${CF_USERNAME} -p ${CF_PASSWORD} -o ${CF_ORGANIZATION} -s ${CF_SPACE}
cf push composer-playground${PLAYGROUND_SUFFIX} -c "node cli.js" -i 2 -m 128M --no-start
cf set-env composer-playground${PLAYGROUND_SUFFIX} CLIENT_ID ${GH_NEXT_OAUTH_CLIENT_ID}
Expand All @@ -171,6 +176,7 @@ else
cf start composer-playground${PLAYGROUND_SUFFIX}
popd


# Configure the Git repository and clean any untracked and unignored build files.
git config user.name "${GH_USER_NAME}"
git config user.email "${GH_USER_EMAIL}"
Expand Down
6 changes: 5 additions & 1 deletion .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ if [ "${DOCS}" != "" ]; then
if [ "${TRAVIS_BRANCH}" = "master" ]; then
npm run full:latest
npm run linkcheck:latest
elif [ "${TRAVIS_BRANCH}" = "v0.16.x" ]; then
elif [[ "${TRAVIS_BRANCH}" =~ v0\.16\.[0-9]{1,2} ]]; then
npm run full:stable
npm run linkcheck:stable
else
echo "Unkown travis branch"
echo ${TRAVIS_BRANCH}
exit 1
fi
else
npm run full:unstable
Expand Down

0 comments on commit 8fc8b20

Please sign in to comment.