commit | author | age
|
de1b35
|
1 |
#!/bin/bash |
JM |
2 |
# |
|
3 |
# ${project.version} release script |
|
4 |
# |
|
5 |
|
|
6 |
# ensure Maven repository is up-to-date |
|
7 |
echo "" |
|
8 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
9 |
echo "Preparing Maven repository" |
|
10 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
11 |
echo "" |
|
12 |
cd ${maven.directory} |
|
13 |
git checkout gh-pages |
|
14 |
git pull |
|
15 |
cd ${project.directory} |
|
16 |
|
|
17 |
# go back one commit to RELEASE commit |
|
18 |
echo "" |
|
19 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
20 |
echo "Checking out ${project.version} RELEASE commit ${project.commitId}" |
|
21 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
22 |
echo "" |
|
23 |
git checkout ${project.commitId} |
|
24 |
|
|
25 |
# build RELEASE artifacts |
|
26 |
echo "" |
|
27 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
28 |
echo "Building ${project.version} RELEASE artifacts" |
|
29 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
30 |
echo "" |
|
31 |
ant clean buildAll buildMavenArtifacts |
|
32 |
|
|
33 |
# commit all generated artifacts and metadata |
|
34 |
echo "" |
|
35 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
36 |
echo "Committing Maven repository ${project.version} RELEASE artifacts" |
|
37 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
38 |
echo "" |
|
39 |
cd ${maven.directory} |
|
40 |
git add . |
|
41 |
git commit -m "${project.version} artifacts" |
|
42 |
cd ${project.directory} |
|
43 |
|
|
44 |
# upload artifacts |
|
45 |
echo "" |
|
46 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
47 |
echo "Uploading ${project.version} artifacts" |
|
48 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
49 |
echo "" |
|
50 |
ant publishBinaries |
|
51 |
|
|
52 |
# build site, update gh-pages, and ftp upload site to hosting provider |
|
53 |
echo "" |
|
54 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
55 |
echo "Building ${project.version} website" |
|
56 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
57 |
echo "" |
|
58 |
ant publishSite |
|
59 |
|
|
60 |
# merge to master |
|
61 |
echo "" |
|
62 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
3cbfeb
|
63 |
echo "Updating build identifier for next release cycle" |
de1b35
|
64 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
JM |
65 |
echo "" |
|
66 |
git checkout master |
|
67 |
ant nextPointReleaseCycle |
|
68 |
|
|
69 |
# push Maven repository to origin |
|
70 |
echo "" |
|
71 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
72 |
echo "Pushing Maven repository" |
|
73 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
|
74 |
echo "" |
|
75 |
cd ${maven.directory} |
|
76 |
git push origin gh-pages |
|
77 |
cd ${project.directory} |
|
78 |
|
|
79 |
# push project branches |
|
80 |
echo "" |
|
81 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
3cbfeb
|
82 |
echo "Pushing master, gh-pages, and tag ${project.tag}" |
de1b35
|
83 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" |
JM |
84 |
echo "" |
3cbfeb
|
85 |
git push origin master gh-pages ${project.tag} |