Skip to content

Commit

Permalink
Simplified release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Willi Schönborn committed Jun 19, 2018
1 parent a9a5d71 commit a3f5b0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
11 changes: 2 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.zalando</groupId>
<artifactId>faux-pas</artifactId>
<version>0.8.0-SNAPSHOT</version>
<version>${revision}</version>

<name>Faux Pas</name>
<description>Error handling in Functional Programming</description>
Expand Down Expand Up @@ -48,6 +48,7 @@
</scm>

<properties>
<revision>0-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down Expand Up @@ -277,14 +278,6 @@
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>1.9.4</version>
<configuration>
<pushChanges>false</pushChanges>
<tag>${project.version}</tag>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
22 changes: 3 additions & 19 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,7 @@

: ${1?"Usage: $0 <major|minor|patch>"}

./mvnw scm:check-local-modification
latest=$(git describe --abbrev=0 || echo 0.0.0)
release=$(semver ${latest} -i $1 --preid RC)

current=$(git describe --abbrev=0 || echo 0.0.0)
release=$(semver ${current} -i $1 --preid RC)
next=$(semver ${release} -i minor)

# release
./mvnw versions:set -D newVersion=${release}
git add $(find . -name pom.xml)
git commit -m "Release ${release}"
./mvnw clean deploy -P release
./mvnw scm:tag

# next development version
./mvnw versions:set -D newVersion=${next}-SNAPSHOT
git add $(find . -name pom.xml)
git commit -m "Development ${next}-SNAPSHOT"

git push
git push --tags
./mvnw scm:check-local-modification clean deploy scm:tag -P release -D revision=${release} -D tag=${release}

0 comments on commit a3f5b0b

Please sign in to comment.