File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # This script will build the project.
3+
4+ SWITCHES=" -s --console=plain"
5+
6+ if [ $CIRCLE_PR_NUMBER ]; then
7+ echo -e " WARN: Should not be here => Found Pull Request #$CIRCLE_PR_NUMBER => Branch [$CIRCLE_BRANCH ]"
8+ echo -e " Not attempting to publish"
9+ elif [ -z $CIRCLE_TAG ]; then
10+ echo -e " Publishing Snapshot => Branch ['$CIRCLE_BRANCH ']"
11+ openssl aes-256-cbc -d -in gradle.properties.enc -out gradle.properties -k " $KEY " -md sha256
12+ ./gradlew snapshot $SWITCHES -x release -x test
13+ elif [ $CIRCLE_TAG ]; then
14+ echo -e " Publishing Release => Branch ['$CIRCLE_BRANCH '] Tag ['$CIRCLE_TAG ']"
15+ openssl aes-256-cbc -d -in gradle.properties.enc -out gradle.properties -k " $KEY " -md sha256
16+ case " $CIRCLE_TAG " in
17+ * -rc\. * )
18+ ./gradlew -Prelease.disableGitChecks=true -Prelease.useLastTag=true candidate bintrayPublish $SWITCHES -x release -x artifactoryPublish
19+ ;;
20+ * )
21+ ./gradlew -Prelease.disableGitChecks=true -Prelease.useLastTag=true final bintrayPublish $SWITCHES -x release -x artifactoryPublish
22+ ;;
23+ esac
24+ else
25+ echo -e " WARN: Should not be here => Branch ['$CIRCLE_BRANCH '] Tag ['$CIRCLE_TAG '] Pull Request ['$CIRCLE_PR_NUMBER ']"
26+ echo -e " Not attempting to publish"
27+ fi
28+
29+ EXIT=$?
30+
31+ exit $EXIT
You can’t perform that action at this time.
0 commit comments