-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from dartartem/master
#6: Added deploying artifacts.
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /bin/bash -e | ||
|
||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [ $BRANCH == "master" ] ; then | ||
BUILD_SNAPSHOT=$(sed -e '/^version=/!d' -e 's/^version=\(.*\)-SNAPSHOT$/\1.BUILD-SNAPSHOT/' < gradle.properties) | ||
echo master: publishing $BUILD_SNAPSHOT | ||
./gradlew -P version=$BUILD_SNAPSHOT -P deployUrl=${S3_REPO_DEPLOY_URL} uploadArchives | ||
exit 0 | ||
fi | ||
|
||
if ! [[ $BRANCH =~ ^[0-9]+ ]] ; then | ||
echo Not release $BRANCH - no PUSH | ||
exit 0 | ||
elif [[ $BRANCH =~ RELEASE$ ]] ; then | ||
BINTRAY_REPO_TYPE=release | ||
elif [[ $BRANCH =~ M[0-9]+$ ]] ; then | ||
BINTRAY_REPO_TYPE=milestone | ||
elif [[ $BRANCH =~ RC[0-9]+$ ]] ; then | ||
BINTRAY_REPO_TYPE=rc | ||
else | ||
echo cannot figure out bintray for this branch $BRANCH | ||
exit -1 | ||
fi | ||
|
||
echo BINTRAY_REPO_TYPE=${BINTRAY_REPO_TYPE} | ||
|
||
VERSION=$BRANCH | ||
|
||
$PREFIX ./gradlew -P version=${VERSION} \ | ||
-P bintrayRepoType=${BINTRAY_REPO_TYPE} \ | ||
-P deployUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-${BINTRAY_REPO_TYPE} \ | ||
testClasses bintrayUpload |