diff --git a/.travis.yml b/.travis.yml index 5eae9c4..c7124e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ after_success: - | if [[ "$TRAVIS_BRANCH" == master && \ "$TRAVIS_PULL_REQUEST" == false && \ - "$TRAVIS_REPO_SLUG" == "$REPO_DOMAIN/$REPO_NAME" ]]; then + -n "$ACCESS_TOKEN" ]]; then ./scripts/release.sh fi deploy: diff --git a/scripts/release.sh b/scripts/release.sh index 838e599..14b47d1 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -37,6 +37,11 @@ if [[ -z "$REPO_NAME" || -z "$REPO_DOMAIN" ]]; then exit 1 fi +if [[ -n "$ACCESS_TOKEN" ]]; then + echo "Unable to release: Github Token not specified" > /dev/stderr + exit 1 +fi + repo_check=`curl -s https://api.github.com/repos/$REPO_DOMAIN/$REPO_NAME` if [[ $repo_check == *"Not Found"* ]]; then echo "Not found a Github repository for $REPO_DOMAIN/$REPO_NAME, it is not possible to publish it" > /dev/stderr