Skip to content

Commit 29c2c1a

Browse files
committed
Merge pull request #50 from hazendaz/master
[travis] Modify snapshot release to not pick up releases
2 parents 456844f + 87424f7 commit 29c2c1a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

travis/after_success.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
# Get Project Repo
2020
mybatis_repo=$(git config --get remote.origin.url 2>&1)
2121
echo "Repo detected: ${mybatis_repo}"
22-
22+
23+
# Get Commit Message
24+
commit_message=$(git log --format=%B -n 1)
25+
echo "Current commit detected: ${commit_message}"
26+
2327
# Get the Java version.
2428
# Java 1.5 will give 15.
2529
# Java 1.6 will give 16.
@@ -42,7 +46,7 @@ echo "Java detected: ${VER}"
4246
# 2. Deploy site
4347
# 3. Use -q option to only display Maven errors and warnings.
4448

45-
if [ "$mybatis_repo" == "https://github.com/mybatis/spring-boot-starter.git" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
49+
if [ "$mybatis_repo" == "https://github.com/mybatis/spring-boot-starter.git" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ] && [[ "$commit_message" != *"[maven-release-plugin]"* ]]; then
4650
if [ $VER == "18" ]; then
4751
mvn clean deploy -q -Dmaven.test.redirectTestOutputToFile=true --settings ./travis/settings.xml
4852
echo -e "Successfully deployed SNAPSHOT artifacts to Sonatype under Travis job ${TRAVIS_JOB_NUMBER}"

0 commit comments

Comments
 (0)