diff options
Diffstat (limited to 'publish-snapshot-on-commit.sh')
-rwxr-xr-x | publish-snapshot-on-commit.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/publish-snapshot-on-commit.sh b/publish-snapshot-on-commit.sh index 0d0e034..ba02b79 100755 --- a/publish-snapshot-on-commit.sh +++ b/publish-snapshot-on-commit.sh @@ -1,13 +1,15 @@ set -eu -if [ "$TRAVIS_REPO_SLUG" == "google/volley" ] && \ - [ "$TRAVIS_PULL_REQUEST" == "false" ] && \ - [ "$TRAVIS_BRANCH" == "master" ]; then - echo -e "Publishing snapshot build to OJO...\n" +GITHUB_BRANCH=${GITHUB_REF#refs/heads/} - ./gradlew artifactoryPublish +if [ "$GITHUB_REPOSITORY" == "google/volley" ] && \ + [ "$GITHUB_EVENT_NAME" == "push" ] && \ + [ "$GITHUB_BRANCH" == "master" ]; then + echo -e "Publishing snapshot build...\n" - echo -e "Published snapshot build to OJO" + ./gradlew publish + + echo -e "Published snapshot build" else echo -e "Not publishing snapshot" -fi
\ No newline at end of file +fi |