-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·55 lines (50 loc) · 997 Bytes
/
deploy.sh
File metadata and controls
executable file
·55 lines (50 loc) · 997 Bytes
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
#!/bin/bash
source $HOME/.passphrases
set -e
if [ ! -e pom.xml ] ; then
echo "This does not appear to be a Maven project."
exit 1
fi
SNAPSHOT=0
CMD=deploy
while [ -n "$1" ] ; do
case $1 in
-s|--snapshot) SNAPSHOT=1 ;;
--dry-run) CMD=package ;;
*)
echo "Unknown option: $1"
exit 1
;;
esac
shift
done
if [ $SNAPSHOT -eq 0 ] ; then
#$HOME/bin/pom
#if [ $? -eq 1 ] ; then exit 1 ; fi
isrelease || {
echo "This is not a release version."
exit 1
}
validate-pom || {
echo "Please fix the POM before deploying a release version."
exit 1
}
else
#$HOME/bin/issnapshot
#if [ $? -eq 1 ] ; then exit 1 ; fi
issnapshot || {
echo "This is not a snapshot version."
exit 1
}
fi
V=`version`
JAR=all-$V-sources.jar
mvn clean
mvn package dependency:sources
cd target/sources
jar cvf $JAR META-INF org
mv $JAR ../
cd ../../
mvn javadoc:jar $CMD -Dgpg.passphrase="$PGP_PASSPHRASE"
#mvn javadoc:jar source:jar gpg:sign deploy -Dgpg.passphrase="$PGP_PASSPHRASE"
#mvn site