-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdeploy-release.sh
executable file
·56 lines (48 loc) · 1.58 KB
/
deploy-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
56
#!/bin/bash
function verifyFileExists {
if [ ! -f $1 ]; then
echo Required file missing: $1
exit 1
fi
}
USER=$1
if [ -z "$USER" ]; then
echo Usage: ./deploy-release.sh username version api-key
exit 1
fi
VERSION=$2
if [ -z "$VERSION" ]; then
echo Usage: ./deploy-release.sh username version api-key
exit 1
fi
API_KEY=$3
if [ -z "$API_KEY" ]; then
echo Usage: ./deploy-release.sh username version api-key
exit 1
fi
verifyFileExists target/xenqtt-$VERSION.jar
verifyFileExists target/xenqtt-$VERSION-sources.jar
verifyFileExists target/xenqtt-$VERSION-javadoc.jar
verifyFileExists README.txt
verifyFileExists target/site/apidocs/index.html
echo Deploying jars...
rm -fR target/deploy-jars
mkdir target/deploy-jars
JARDIR=target/deploy-jars/$VERSION
mkdir $JARDIR
cp target/xenqtt-$VERSION*.jar $JARDIR
cp $JARDIR/xenqtt-$VERSION.jar $JARDIR/xenqtt.jar
rsync -avP -e ssh --delete-excluded --exclude=.svn $JARDIR $USER,[email protected]:/home/frs/project/xenqtt
scp README.txt [email protected]:/home/frs/project/xenqtt
echo
echo Deploying javadoc...
rm -fR target/deploy-docs
mkdir target/deploy-docs
DOCDIR=target/deploy-docs/$VERSION
mkdir $DOCDIR
cp -a target/site/apidocs/* $DOCDIR
rsync -avP -e ssh --exclude=.svn --exclude=.htaccess $DOCDIR $USER,[email protected]:/home/project-web/xenqtt/htdocs/apidocs
echo
echo Configuring default download file...
curl -H "Accept: application/json" -X PUT -d "default=windows&default=mac&default=linux&default=bsd&default=solaris&default=others" -d "api_key=$API_KEY" https://sourceforge.net/projects/xenqtt/files/$VERSION/xenqtt.jar
echo