forked from querydsl/querydsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·45 lines (41 loc) · 1.16 KB
/
release.sh
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
#!/bin/sh
VERSION=$2
TAG=QUERYDSL_`sed 's/\./_/g' <<< $VERSION`
pre() {
git checkout master
git pull
mvn -Pall,docs versions:set -DgenerateBackupPoms=false -DnewVersion=$VERSION
sed -i '' "s/4\..\../$VERSION/" querydsl-docs/src/main/docbook/en-US/Querydsl_Reference.xml
git checkout -b querydsl-$VERSION
git add .
git commit -m "Querydsl $VERSION"
git push origin querydsl-$VERSION
# TODO create PR
}
doit() {
git checkout master
git pull --ff-only
mvn clean deploy -DskipTests -Dgpg.skip=false
./dist.sh
ssh [email protected] "mkdir /var/www/html/static/querydsl/$VERSION"
scp -r target/dist/* [email protected]:/var/www/html/static/querydsl/$VERSION/
ssh [email protected] "cd /var/www/html/static/querydsl && unlink latest && ln -sT $VERSION latest"
git tag $TAG
git push --tags
echo -e "Don't forget \x1b[33mquerydsl-contrib\x1b[m."
}
post() {
echo "post release stuff"
# TODO update querydsl.com
# TODO close github milestone
# TODO bump version
}
if [ “$1” == “pre” ]; then
pre
elif [ “$1” == “doit” ]; then
doit
elif [ “$1” == “post” ]; then
post
else
echo "./release (pre|doit|post) VERSION"
fi