-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): issues/97 branching and integration
* expanded ci build stages * leverage stage names to determine beta path deployment
- Loading branch information
Showing
3 changed files
with
54 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,56 @@ | ||
#!/bin/bash | ||
# | ||
# | ||
# main() | ||
# CI/Dev beta release for "ci-beta" and "qa-beta" branches, based on deploy stage name | ||
# | ||
releaseDev() | ||
{ | ||
set -e | ||
set -x | ||
|
||
if [ "${TRAVIS_BRANCH}" = "ci" ]; then | ||
echo "PUSHING ci-beta" | ||
if [[ "${TRAVIS_BRANCH}" = "ci" ]] && [[ $TRAVIS_BUILD_STAGE_NAME == *"Beta"* ]]; then | ||
printf "${YELLOW}PUSHING ci-beta${NOCOLOR}\n" | ||
rm -rf ./build/.git | ||
.travis/release.sh "ci-beta" | ||
printf "${GREEN}COMPLETED ci-beta${NOCOLOR}\n" | ||
|
||
echo "PUSHING qa-beta" | ||
printf "${YELLOW}PUSHING qa-beta${NOCOLOR}\n" | ||
rm -rf ./build/.git | ||
.travis/release.sh "qa-beta" | ||
printf "${GREEN}COMPLETED qa-beta${NOCOLOR}\n" | ||
fi | ||
|
||
if [ "${TRAVIS_BRANCH}" = "master" ]; then | ||
echo "PUSHING prod-beta" | ||
} | ||
# | ||
# | ||
# Prod release for "master" branch based on deploy stage name. | ||
# | ||
releaseProd() | ||
{ | ||
if [[ "${TRAVIS_BRANCH}" = "master" ]] && [[ $TRAVIS_BUILD_STAGE_NAME == *"Beta"* ]]; then | ||
printf "${YELLOW}PUSHING prod-beta${NOCOLOR}\n" | ||
rm -rf ./build/.git | ||
.travis/release.sh "prod-beta" | ||
printf "${GREEN}COMPLETED prod-beta${NOCOLOR}\n" | ||
fi | ||
|
||
echo "PUSHING prod-stable" | ||
if [[ "${TRAVIS_BRANCH}" = "master" ]] && [[ $TRAVIS_BUILD_STAGE_NAME != *"Beta"* ]]; then | ||
printf "${YELLOW}PUSHING prod-stable${NOCOLOR}\n" | ||
rm -rf ./build/.git | ||
.travis/release.sh "prod-stable" | ||
printf "${GREEN}COMPLETED prod-stable${NOCOLOR}\n" | ||
fi | ||
} | ||
# | ||
# | ||
# main() | ||
# | ||
{ | ||
set -e | ||
set -x | ||
|
||
BLUE="\e[34m" | ||
RED="\e[31m" | ||
GREEN="\e[32m" | ||
YELLOW="\e[33m" | ||
NOCOLOR="\e[39m" | ||
|
||
releaseDev | ||
releaseProd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters