• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# see https://coderwall.com/p/9b_lfq
2
3set -eu
4
5if [ "$TRAVIS_REPO_SLUG" == "google/dagger" ] && \
6   [ "$TRAVIS_JDK_VERSION" == "$JDK_FOR_PUBLISHING" ] && \
7   [ "$TRAVIS_PULL_REQUEST" == "false" ] && \
8   [ "$TRAVIS_BRANCH" == "master" ]; then
9  echo -e "Publishing maven snapshot...\n"
10
11  bash $(dirname $0)/execute-deploy.sh \
12    "deploy:deploy-file" \
13    "HEAD-SNAPSHOT" \
14    "-DrepositoryId=sonatype-nexus-snapshots" \
15    "-Durl=https://oss.sonatype.org/content/repositories/snapshots" \
16    "--settings=$(dirname $0)/settings.xml"
17
18  echo -e "Published maven snapshot"
19else
20  echo -e "Not publishing snapshot for jdk=${TRAVIS_JDK_VERSION} and branch=${TRAVIS_BRANCH}"
21fi
22