Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 113 lines (78 sloc) 1.829 kB
f7dcce9 Added script to help roll releases. Removed unneeded DISCLAIMER. Mo…
Tom Hobbs authored
1 #!/bin/bash
2
3 function test_tar_release {
4 TMP_DIR=tar_release_test
5
6 mkdir $TMP_DIR
7 cp dist/apache-river-$VERSION-src.tar.gz $TMP_DIR
8 cd $TMP_DIR
9
10 tar xf apache-river-$VERSION-src.tar.gz
11 cd apache-river-2.2.0
12
13 ant build
14
15 echo
16 echo "Release built from TAR correctly"
17
18 cd ../..
19
20 rm -rf $TMP_DIR
21 }
22
23 function test_zip_release {
24 TMP_DIR=zip_release_test
25
26 mkdir $TMP_DIR
27 cp dist/apache-river-$VERSION-src.zip $TMP_DIR
28 cd $TMP_DIR
29
30 unzip apache-river-$VERSION-src.zip
31 cd apache-river-$VERSION
32
33 ant build
34
35 echo
36 echo "Release built from ZIP correctly"
37
38 cd ../..
39
40 rm -rf $TMP_DIR
41 }
42
43 function sign_all {
44 echo
45 echo "Signing release artifacts"
46
47 cd dist
48 for f in $( ls ); do
49 gpg --armor --output $f.asc --detach-sign $f
50 gpg --print-md SHA512 $f > $f.sha
51 done
52 cd ..
53 }
54
55 function rat_report {
56 echo
57 echo "Running RAT report"
58
59 if [ "${RAT_HOME+x}" = "x" ]; then
60 echo "Using RAT_HOME=${RAT_HOME}"
61 else
62 echo "Please set RAT_HOME before continuing"
63 exit 1
64 fi
65
66 java -jar $RAT_HOME/apache-rat-0.7.jar -d src > RAT_REPORT_src.txt
67 java -jar $RAT_HOME/apache-rat-0.7.jar -d examples -e *.mf > RAT_REPORT_examples.txt
68 java -jar $RAT_HOME/apache-rat-0.7.jar -d qa/jtreg -e *.mf > RAT_REPORT_qa_jtreg.txt
69
70 mv RAT_REPORT* dist/
71 }
72
73 function upload_all {
1b9fc65 corrected small typo in script
Tom Hobbs authored
74 UPLOAD_DEST=$1
75
f7dcce9 Added script to help roll releases. Removed unneeded DISCLAIMER. Mo…
Tom Hobbs authored
76 echo
77 echo "Uploading artifacts to $UPLOAD_DEST"
78
79 cd dist
80 scp * $UPLOAD_DEST
81 cd ..
82 }
83
84 function confirm_continue {
85 QUIT_MSG=$1
86
87 echo
88 echo "Continue? [Yy]ess [Nn]o"
89 read CONTINUE
90
91 [[ 'n' = $CONTINUE || 'N' = $CONTINUE ]] && echo $QUIT_MSG
92 }
93
94 VERSION=2.2.0
95
96 echo "Rolling River Release $VERSION"
97
98 echo
99 echo "Checking repo status"
100
101 svn st
102
103 confirm_continue "Please Update repo state and then re-run this script."
104
105 ant release
106
107 test_tar_release
108 test_zip_release
109
110 sign_all
111 rat_report
112 upload_all thobbs@people.apache.org:~/public_html/river/
Something went wrong with that request. Please try again.