Skip to content

3.x: Do not update snapshot Javadocs from secondary branches #6752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions gradle/buildViaTravis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ export GRADLE_OPTS=-Xmx1024m

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew -PreleaseMode=pr build
./gradlew -PreleaseMode=pr build --stacktrace
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -PreleaseMode=branch -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build --stacktrace
if [ "$TRAVIS_BRANCH" != "3.x" ]; then
echo -e 'Build secondary Branch (no snapshot) => Branch ['$TRAVIS_BRANCH']'
./gradlew -PreleaseMode=pr build --stacktrace
else
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -PreleaseMode=branch -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build --stacktrace
fi
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
./gradlew -PreleaseMode=full -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build --stacktrace
Expand Down
6 changes: 6 additions & 0 deletions gradle/push_javadoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
exit 0
fi

# only when on the 3.x branch and not tagged
if [ "$TRAVIS_BRANCH" != "3.x" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e "On a secondary branch '$TRAVIS_BRANCH', skipping JavaDocs pushback."
exit 0
fi

# get the current build tag if any
buildTag="$TRAVIS_TAG"
echo -e "Travis tag: '$buildTag'"
Expand Down