commit | author | age
|
5aec86
|
1 |
#!/bin/bash
|
JM |
2 |
#
|
|
3 |
# ${project.version} release script
|
|
4 |
#
|
|
5 |
|
f12685
|
6 |
# ensure Maven repository is up-to-date
|
JM |
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 |
|
5aec86
|
17 |
# go back one commit to RELEASE commit
|
JM |
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 ""
|
7fa7ba
|
31 |
ant clean buildAll buildMavenArtifacts
|
f12685
|
32 |
|
JM |
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}
|
5aec86
|
43 |
|
JM |
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 |
# return to project master
|
|
61 |
echo ""
|
|
62 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
63 |
echo "Checking out master"
|
|
64 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
65 |
echo ""
|
|
66 |
git checkout master
|
|
67 |
|
f12685
|
68 |
# push Maven repository to origin
|
JM |
69 |
echo ""
|
|
70 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
71 |
echo "Pushing Maven repository"
|
|
72 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
73 |
echo ""
|
|
74 |
cd ${maven.directory}
|
|
75 |
git push origin gh-pages
|
|
76 |
cd ${project.directory}
|
|
77 |
|
5aec86
|
78 |
# push project branches
|
JM |
79 |
echo ""
|
|
80 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
81 |
echo "Pushing master, gh-pages, and tag ${project.tag}"
|
|
82 |
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
|
83 |
echo ""
|
|
84 |
git push origin master gh-pages tag ${project.tag}
|