-
-
Notifications
You must be signed in to change notification settings - Fork 96
/
deploy.sh
executable file
·52 lines (40 loc) · 1.43 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# This script expects:
# - the version to be deployed as the first parameter
# to exit in case of error
set -e
set -v
function pause {
echo
read -p "Press [enter] to continue"
}
# Weird fix required by GPG. See https://github.com/keybase/keybase-issues/issues/1712. You will have to enter the passphrase on screen
export GPG_TTY=$(tty)
# Make sure we are running a Java version above 9 to get module-test in the release
javaVersion=$(mvn -N help:evaluate -Dexpression="java.version" -q -DforceStdout | cut -d'.' -f1)
if [ $javaVersion -lt 9 ]; then
echo "Java version must be 9+ for the release"
exit 1
fi
mvn release:prepare -Pall,full,release
# Need to push now because release:perform will checkout the remote tag
git push
git push --tags
mvn release:perform -Pall,full,release
echo "Please add the release notes and copy binaries (main, tck, exotic) in github"
open "https://github.com/easymock/objenesis/tags"
pause
# Release the jars now on central staging
echo "Check everything is alright, next step will release to central"
echo "Right now you need to delete some of the projects from staging (i.e. benchmark, gae, website) unless it was fixed by the skipStaging flag"
open "https://oss.sonatype.org/#welcome"
pause
pushd target/checkout
mvn -N nexus-staging:release
popd
echo "Close the milestone in GitHub and create the new one"
open "https://github.com/easymock/objenesis/milestones"
pause
echo
echo "Job done!"
echo