Skip to content

Commit

Permalink
Setting up release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingrzejszczak committed Dec 1, 2020
1 parent 38a46ee commit 05e3d38
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ dependency-reduced-pom.xml
.vscode/
.flattened-pom.xml
.sdkmanrc
release.properties
pom.xml.next
pom.xml.releaseBackup
pom.xml.tag
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,17 @@
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<!-- <preparationGoals>clean install</preparationGoals>-->
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</build>
</project>
12 changes: 11 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
#!/usr/bin/env bash
git fetch --tags && ./gradlew clean build && ./gradlew createRelease && ./gradlew uploadArchives && ./gradlew closeAndReleaseRepository && git push origin master --tags

set -o errexit

export DEV_VERSION="${DEV_VERSION:?You must set the next dev version}"
export RELEASE_VERSION="${RELEASE_VERSION:?You must set the next release version}"

echo "Will release [${RELEASE_VERSION}] and then bump to dev version [${DEV_VERSION}]"
git fetch --tags && \
./mvnw -B -Dtag=v"${RELEASE_VERSION}" release:clean release:prepare -DreleaseVersion="${RELEASE_VERSION}" -DdevelopmentVersion="${DEV_VERSION}" && \
./mvnw -B -Dtag=v"${RELEASE_VERSION}" -DreleaseVersion="${RELEASE_VERSION}" -DdevelopmentVersion="${DEV_VERSION}" -Dgoals=deploy release:perform && \
git push origin master --tags

0 comments on commit 05e3d38

Please sign in to comment.