Skip to content

Commit

Permalink
Make get_release_commands.sh spit shell-script.
Browse files Browse the repository at this point in the history
Use it like this now:

./get_release_commands.sh 1.8 > release.sh
chmod u+x release.sh
./release.sh
  • Loading branch information
shelajev committed Jul 6, 2014
1 parent a993e32 commit dbe640a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ test.log
.project
.settings/
.idea
pom.xml.versionsBackup
release.sh
33 changes: 19 additions & 14 deletions get_release_commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,61 +23,66 @@ incr_last_digit=$((${version_after_dot}+1))
version_without_last_digit=${version: 0:${version_str_length}}
new_version="${version_without_last_digit}${incr_last_digit}-SNAPSHOT"

echo "#!/bin/sh"

echo "set -xe"

if [[ "$2z" = "z" ]]; then
echo "No new development version given using ${new_version}"
echo "# No new development version given using ${new_version}"
else
new_version=$2
echo "New development version will be ${new_version}"
echo "# New development version will be ${new_version}"
fi

echo "To release zt-zip version ${version} run these commands:"

echo "# To release zt-zip version ${version} run these commands:"
echo ""
echo "1) set release version"
echo "# 1) set release version"
echo "mvn versions:set -DnewVersion=${version}"

echo ""
echo "2) commit & tag"
echo "# 2) commit & tag"
echo "git add pom.xml; "
echo "git commit -m \"Prepare release zt-zip-${version}\""
echo "git tag zt-zip-${version}"

echo ""
echo "3) build release"
echo "# 3) build release"
echo "mvn clean install"

echo ""
echo "4) generate javadoc archive"
echo "# 4) generate javadoc archive"
echo "mvn javadoc:jar"

echo ""
echo "5) generate sources archive"
echo "# 5) generate sources archive"
echo "mvn source:jar"

echo ""
echo "6) deploy and sign releases archive"
echo "# 6) deploy and sign releases archive"
echo "mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=pom.xml -Dfile=target/zt-zip-$1.jar"

echo ""
echo "7) deploy and sign sources archive"
echo "# 7) deploy and sign sources archive"
echo "mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=pom.xml -Dfile=target/zt-zip-$1-sources.jar -Dclassifier=sources"

echo ""
echo "8) deploy and sign javadoc archive"
echo "# 8) deploy and sign javadoc archive"
echo "mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=pom.xml -Dfile=target/zt-zip-$1-javadoc.jar -Dclassifier=javadoc"

echo ""
echo "9) set new development version"
echo "# 9) set new development version"
echo "mvn versions:set -DnewVersion=${new_version}"
echo "git add pom.xml; "
echo "git commit -m \"prepare for next development iteration\""

echo ""
echo "10) push to GitHub"
echo "# 10) push to GitHub"
echo "git push"
echo "git push --tags"

echo ""
echo "11) clean local repo"
echo "# 11) clean local repo"
echo "git clean -f"


Expand Down

0 comments on commit dbe640a

Please sign in to comment.