Skip to content

Commit

Permalink
Merge pull request #514 from MarathonLabs/feat/release-batching
Browse files Browse the repository at this point in the history
feat(ci): assemble before publishing to batch artifacts in sonatype
  • Loading branch information
Malinskiy authored Jun 6, 2021
2 parents 4b2fc10 + 94dd45b commit 4e35082
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
9 changes: 6 additions & 3 deletions .buildsystem/deploy-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ if [ -z "$GPG_PASSPHRASE" ]; then
exit 1
fi

TARGETS=""
ASSEMBLE_TARGETS=""
PUBLISH_TARGETS=""
for i in ":core" ":vendor:vendor-android:base" ":vendor:vendor-android:ddmlib" ":vendor:vendor-android:adam" ":marathon-gradle-plugin" ":report:execution-timeline" ":report:html-report" ":analytics:usage"; do
TARGETS="$TARGETS $i:publishDefaultPublicationToGitHubRepository"
ASSEMBLE_TARGETS="$ASSEMBLE_TARGETS $i:assemble"
PUBLISH_TARGETS="$PUBLISH_TARGETS $i:publishDefaultPublicationToGitHubRepository"
done

if [ -n "$GIT_TAG_NAME" ]; then
echo "on a tag -> deploy release version $GIT_TAG_NAME"
./gradlew $TARGETS -PreleaseMode=RELEASE
./gradlew $ASSEMBLE_TARGETS -PreleaseMode=RELEASE
./gradlew $PUBLISH_TARGETS -PreleaseMode=RELEASE
else
echo "not on a tag -> skipping deployment to GitHub"
fi
12 changes: 8 additions & 4 deletions .buildsystem/deploy-sonatype.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@ if [ -z "$GPG_PASSPHRASE" ]; then
exit 1
fi

TARGETS=""
ASSEMBLE_TARGETS=""
PUBLISH_TARGETS=""
for i in ":core" ":vendor:vendor-android:base" ":vendor:vendor-android:ddmlib" ":vendor:vendor-android:adam" ":marathon-gradle-plugin" ":report:execution-timeline" ":report:html-report" ":analytics:usage"; do
TARGETS="$TARGETS $i:publishDefaultPublicationToOSSHRRepository"
ASSEMBLE_TARGETS="$ASSEMBLE_TARGETS $i:assemble"
PUBLISH_TARGETS="$PUBLISH_TARGETS $i:publishDefaultPublicationToOSSHRRepository"
done

if [ -z "$GIT_TAG_NAME" ]; then
echo "not on a tag -> deploy snapshot version"
./gradlew $TARGETS -PreleaseMode=SNAPSHOT
./gradlew $ASSEMBLE_TARGETS -PreleaseMode=SNAPSHOT
./gradlew $PUBLISH_TARGETS -PreleaseMode=SNAPSHOT
else
echo "on a tag -> deploy release version $GIT_TAG_NAME"
./gradlew $TARGETS -PreleaseMode=RELEASE
./gradlew $ASSEMBLE_TARGETS -PreleaseMode=RELEASE
./gradlew $PUBLISH_TARGETS -PreleaseMode=RELEASE
fi

0 comments on commit 4e35082

Please sign in to comment.