File: deploy.sh

package info (click to toggle)
objenesis 3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,324 kB
  • sloc: java: 3,858; xml: 1,601; sh: 71; makefile: 2
file content (61 lines) | stat: -rwxr-xr-x 1,629 bytes parent folder | download
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
53
54
55
56
57
58
59
60
61
#!/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

echo "Update the Maven version to the release version"
mvn versions:set -DremoveSnapshot=true -DgenerateBackupPoms=false -Pall

echo "Deploy"
mvn deploy -Pall,full,release
echo "Check deployment to central"
pause

echo "Commit release"
mvn scm:checkin -Dmessage='[release] Release ${project.version}' -DpushChanges=false

echo "Tag"
mvn scm:tag -Dtag='${project.version}' -DpushChanges=false

echo "Move to the next maven version"
mvn versions:set -DnextSnapshot=true -DgenerateBackupPoms=false -Pall

echo "Commit next version"
mvn scm:checkin -Dmessage='[release] Start of ${project.version}' -DpushChanges=false

echo "Check everything is alright before pushing"
pause

git push
git push --tags

echo "Please add the release notes and copy binaries (main, tck, exotic) in github"
open "https://github.com/easymock/objenesis/tags"
pause

echo "Close the milestone in GitHub and create the new one"
open "https://github.com/easymock/objenesis/milestones"
pause

echo
echo "Job done!"
echo