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

Commit b06a4e5

Browse files
author
Andres
committed
Check token instead of repo domain and ID
1 parent aade281 commit b06a4e5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ after_success:
2222
- |
2323
if [[ "$TRAVIS_BRANCH" == master && \
2424
"$TRAVIS_PULL_REQUEST" == false && \
25-
"$TRAVIS_REPO_SLUG" == "$REPO_DOMAIN/$REPO_NAME" ]]; then
25+
-n "$ACCESS_TOKEN" ]]; then
2626
./scripts/release.sh
2727
fi
2828
deploy:

scripts/release.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ if [[ -z "$REPO_NAME" || -z "$REPO_DOMAIN" ]]; then
3737
exit 1
3838
fi
3939

40+
if [[ -n "$ACCESS_TOKEN" ]]; then
41+
echo "Unable to release: Github Token not specified" > /dev/stderr
42+
exit 1
43+
fi
44+
4045
repo_check=`curl -s https://api.github.com/repos/$REPO_DOMAIN/$REPO_NAME`
4146
if [[ $repo_check == *"Not Found"* ]]; then
4247
echo "Not found a Github repository for $REPO_DOMAIN/$REPO_NAME, it is not possible to publish it" > /dev/stderr

0 commit comments

Comments
 (0)