forked from Tinder/GitQuery
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish
More file actions
executable file
·21 lines (18 loc) · 745 Bytes
/
publish
File metadata and controls
executable file
·21 lines (18 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#
# Deploy a jar, source jar, and javadoc jar to Sonatype's snapshot repo.
#
# Adapted from https://coderwall.com/p/9b_lfq and
# http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/
REPO_URL="git@github.com:Tinder/GitQuery.git"
BRANCH="master"
set -e
if [ "${CIRCLE_REPOSITORY_URL}" != "$REPO_URL" ]; then
echo "Skipping snapshot deployment: wrong repository. Expected '$REPO_URL' but was '${CIRCLE_REPOSITORY_URL}'."
elif [ "${CIRCLE_BRANCH}" != "$BRANCH" ]; then
echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '${CIRCLE_BRANCH}'."
else
echo "Deploying snapshot..."
./gradlew clean uploadArchives --no-daemon --no-parallel
echo "Snapshot deployed!"
fi