forked from querydsl/querydsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·48 lines (43 loc) · 1.32 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
46
47
48
#!/usr/bin/env bash
set -e
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
export GPG_TTY=$(tty)
mvn clean deploy -DskipTests -Pall -Dgpg.skip=false -Dgpg.keyname=57312C37B064EE0FDAB0130490D5CE79E1DE6A2C -Denforcer.skip=true
./dist.sh
ssh -i ~/.ssh/querydsl.com [email protected] "mkdir /var/www/html/static/querydsl/$VERSION"
scp -r -i ~/.ssh/querydsl.com 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