Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions activestate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,22 @@ scripts:
set -e
$constants.SET_ENV

if [ "$GITHUB_HEAD_REF" != "" ]; then
BRANCH=${GITHUB_HEAD_REF}
elif [ "$GITHUB_REF" != "" ]; then
BRANCH=$(echo $GITHUB_REF | awk -F'/' '{print $NF}')
else
BRANCH=$(git rev-parse --abbrev-ref HEAD)
fi

if [ "$BRANCH" == "" ]; then
echo "Branch cannot be empty"
exit 1
fi
if [ "$BRANCH" == "release" ]; then
BRANCH=""
fi

PREFIX="remote-installer"
if [ "$DEPLOY_TO_STAGING" = "true" ]; then
PREFIX="staging/$PREFIX"
Expand All @@ -281,6 +297,10 @@ scripts:
echo "Deploying remote installer to production: $PREFIX"
fi

if [ "$BRANCH" != "" ]; then
PREFIX="$PREFIX/$BRANCH"
fi

go run scripts/ci/s3-deployer/main.go $BUILD_TARGET_DIR/remote-installer us-east-1 state-tool $PREFIX
- name: promote-staging-to-production
language: bash
Expand Down
Loading