@@ -60,6 +60,15 @@ if [ "$should_continue" != "y" ]; then
6060 exit 1
6161fi
6262
63+ mvn test
64+
65+ read -r -n 1 -p " Continue given above tests? (y/n) " should_continue
66+
67+ if [ " $should_continue " != " y" ]; then
68+ echo " Aborting"
69+ exit 1
70+ fi
71+
6372page=.gh-pages/index.md
6473cat << EOF > $page
6574---
@@ -71,35 +80,26 @@ version: $tag
7180
7281EOF
7382
74- read -r -n 1 -p " Continue given above dependencies? (y/n) " should_continue
75-
76- if [ " $should_continue " != " y" ]; then
77- echo " Aborting"
78- exit 1
79- fi
83+ mvn versions:set -DnewVersion=" $version "
8084
8185perl -pi -e " s/(?<=<version>)[^<]*/$version /" README.md
8286perl -pi -e " s/(?<=com\.maxmind\.db\:maxmind-db\:)\d+\.\d+\.\d+([\w\-]+)?/$version /" README.md
8387
8488cat README.md >> $page
8589
86- if [ -n " $( git status --porcelain) " ]; then
87- git diff
88-
89- read -r -n 1 -p " Commit README.md changes? " should_commit
90- if [ " $should_commit " != " y" ]; then
91- echo " Aborting"
92- exit 1
93- fi
94- git add README.md
95- git commit -m ' update version number in README.md'
90+ git diff
91+
92+ read -r -n 1 -p " Commit changes? " should_commit
93+ if [ " $should_commit " != " y" ]; then
94+ echo " Aborting"
95+ exit 1
9696fi
97+ git add README.md pom.xml
98+ git commit -m " Preparing for $version "
99+
97100
101+ mvn clean deploy
98102
99- # could be combined with the primary build
100- mvn release:clean
101- mvn release:prepare -DreleaseVersion=" $version " -Dtag=" $tag "
102- mvn release:perform
103103rm -fr " .gh-pages/doc/$tag "
104104cp -r target/checkout/target/reports/apidocs " .gh-pages/doc/$tag "
105105rm .gh-pages/doc/latest
@@ -127,6 +127,5 @@ git push
127127popd
128128
129129git push
130- git push --tags
131130
132131gh release create --target " $( git branch --show-current) " -t " $version " -n " $notes " " $tag "
0 commit comments