Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Check token instead of repo domain and ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres committed Sep 5, 2017
1 parent aade281 commit b06a4e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b06a4e5

Please sign in to comment.