forked from checkstyle/checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·55 lines (37 loc) · 1.56 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
49
50
51
52
53
54
55
#!/usr/bin/bash
set -e
#https://github.com/checkstyle/checkstyle/wiki/How-to-make-a-release
SF_USER=romanivanov
PREV_RELEASE=6.15
RELEASE=6.16
#############################
echo "exit" | ssh -t $SF_USER,[email protected] create
# Version bump in pom.xml - https://github.com/checkstyle/checkstyle/commits/master
mvn -Pgpg release:prepare -B -Darguments="-DskipTests -DskipITs -Dpmd.skip=true -Dfindbugs.skip=true -Dcobertura.skip=true -Dcheckstyle.ant.skip=true -Dcheckstyle.skip=true -Dxml.skip=true"
# deployment of jars to maven central and publication of site to http://checkstyle.sourceforge.net/new-site/
mvn -Pgpg release:perform -Darguments='-Dcheckstyle.ant.skip=true'
#############################
ssh $SF_USER,[email protected] << EOF
#Swap html content
cd /home/project-web/checkstyle
mv htdocs/new-site/ .
mv htdocs htdocs-$PREV_RELEASE
mv new-site htdocs
ln -s /home/project-web/checkstyle/reports htdocs/reports
#Archiving
tar cfz htdocs-$PREV_RELEASE.tar.gz htdocs-$PREV_RELEASE/
rm -rf htdocs-$PREV_RELEASE/
EOF
##############################
git checkout checkstyle-$RELEASE
#Generate all binaries
mvn -Passembly clean package
#Publish them to sourceforce
FRS_PATH=/home/frs/project/checkstyle/checkstyle/$RELEASE
ssh $SF_USER,[email protected] "mkdir -p $FRS_PATH"
# !!! THIS WILL AS A PASSWORD !!
scp target/*.jar [email protected]:$FRS_PATH
scp target/*.tar.gz [email protected]:$FRS_PATH
scp target/*.zip [email protected]:$FRS_PATH
git checkout master
##############################