Created
July 29, 2018 05:01
-
-
Save wizact/27895c1b29ae66ac3d73f32e4b5f8484 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env bash | |
set -e | |
set -u | |
set -o pipefail | |
fix_name() { | |
DOCKERFILE_NAME="Dockerfile" | |
if [[ $CIRCLE_BRANCH = 'release' ]]; then | |
DOCKERFILE_NAME="$DOCKERFILE_NAME.prod"; | |
elif [[ $CIRCLE_BRANCH = 'test.1' ]]; then | |
DOCKERFILE_NAME="$DOCKERFILE_NAME.test.1" | |
else | |
DOCKERFILE_NAME="$DOCKERFILE_NAME.dev" | |
fi; | |
mv -f ./$DOCKERFILE_NAME ./Dockerfile | |
} | |
fix_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment