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

Commit

Permalink
feat(let circle CI config control which branches are built)
Browse files Browse the repository at this point in the history
  • Loading branch information
laser committed Jun 14, 2019
1 parent 225d47b commit 13f7b54
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scripts/publish-release.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
#!/usr/bin/env bash

RELEASE_BRANCH="master"
set -Eeuo pipefail

RELEASE_NAME="$CIRCLE_PROJECT_REPONAME-`uname`"
RELEASE_FILE="/tmp/$RELEASE_NAME.tar.gz"
RELEASE_TAG="${CIRCLE_SHA1:0:16}"

# make sure we're on the sanctioned branch
if [ "$CIRCLE_BRANCH" != "$RELEASE_BRANCH" ]; then
echo "not on branch \"$RELEASE_BRANCH\", skipping publish"
exit 0
fi

# make sure we have a token set, api requests won't work otherwise
if [ -z $GITHUB_TOKEN ]; then
echo "\$GITHUB_TOKEN not set, publish failed"
Expand Down

0 comments on commit 13f7b54

Please sign in to comment.