Skip to content

Commit

Permalink
Set version to 1.3.27
Browse files Browse the repository at this point in the history
  • Loading branch information
asturio committed Mar 5, 2022
1 parent 5943187 commit 3b1b00e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 16 deletions.
26 changes: 15 additions & 11 deletions createRelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ then
exit
fi

VERSION=$(grep "<version>" pom.xml | head -1 | sed "s/.*<version>\([0-9.]*\)-SNAPSHOT<\/version>.*/\1/")
VERSION=$(grep "<version>" pom.xml | head -1 | sed "s/.*<version>\([0-9.]*\)\(-SNAPSHOT\)\{0,1\}<\/version>.*/\1/")
NEW_VERSION=${1}-SNAPSHOT

cat << EOD
Expand All @@ -28,40 +28,44 @@ Press ENTER to continue. Ctrl-C to stop.
EOD
read ignored

echo "1. Setting release version: ${VERSION}"
mvn versions:set -DnewVersion="${VERSION}"
# echo "#1. Setting release version: ${VERSION}"
# mvn versions:set -DnewVersion="${VERSION}"

echo "2. Test build"
echo "#2. Test build"
mvn clean install
[ $? -eq 0 ] || echo "Errors. Exiting." && exit
RC=$?
if [ ${RC} -ne 0 ]
then
echo "Errors. Exiting."
exit
fi

echo "3. Commit changes and tag"
echo "#3. Commit changes and tag"
git commit -a -m "Set version to ${VERSION}" && git tag "${VERSION}"

echo "4. Make a staging release"
echo "#4. Make a staging release"
mvn clean deploy
RC=$?

if [ $RC -eq 0 ]
then
cat << EOD
Staging Release seems to be created. Please review it at https://oss.sonatype.org/#stagingRepositories
if everything seems fine, hit ENTER. Else break this script with Ctrl-C.
EOD
read pause
else
echo "Something went wrong. Please switch to manual deploy."
echo "(look at https://github.com/LibrePDF/OpenPDF/wiki/Release-Process)"
exit
fi

echo "5. Deploy release."
echo "#5. Deploy release."
mvn nexus-staging:release

echo "6. Finishing."
echo "#6. Finishing."
echo " - set next SNAPSHOT to $NEW_VERSION"
mvn versions:set -DnewVersion="$NEW_VERSION"
echo " - commit changes"
git commit -a -m "Set new Snapshot to $NEW_VERSION"
echo " - push all to github"
git push "${LIBREPDF_ORIGIN}" --tags

2 changes: 1 addition & 1 deletion openpdf-fonts-extra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.github.librepdf</groupId>
<artifactId>openpdf-parent</artifactId>
<version>1.3.27-SNAPSHOT</version>
<version>1.3.27</version>
</parent>

<artifactId>openpdf-fonts-extra</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion openpdf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.github.librepdf</groupId>
<artifactId>openpdf-parent</artifactId>
<version>1.3.27-SNAPSHOT</version>
<version>1.3.27</version>
</parent>

<artifactId>openpdf</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pdf-swing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.github.librepdf</groupId>
<artifactId>openpdf-parent</artifactId>
<version>1.3.27-SNAPSHOT</version>
<version>1.3.27</version>
</parent>

<artifactId>pdf-swing</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pdf-toolbox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.github.librepdf</groupId>
<artifactId>openpdf-parent</artifactId>
<version>1.3.27-SNAPSHOT</version>
<version>1.3.27</version>
</parent>

<artifactId>pdf-toolbox</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.github.librepdf</groupId>
<artifactId>openpdf-parent</artifactId>
<version>1.3.27-SNAPSHOT</version> <!-- artifact.version -->
<version>1.3.27</version> <!-- artifact.version -->
<packaging>pom</packaging>

<!-- please run mvn tidy:pom once in a while -->
Expand Down

0 comments on commit 3b1b00e

Please sign in to comment.