-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathpack.sh
51 lines (44 loc) · 2.63 KB
/
pack.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
VERSION=`./gradlew version | grep Version | cut -f 2 -d " "`
PASSPHRASE=`cat ~/.gnupg/passphrase.txt`
GPGPARAMS="--passphrase $PASSPHRASE --batch --yes --no-tty"
./gradlew assemble generatePom
echo
echo CORE
echo
sed s/unspecified/$VERSION/g kanvas-core/build/pom.xml > kanvas-core/build/pom_corrected.xml
mv kanvas-core/build/pom_corrected.xml kanvas-core/build/pom.xml
gpg $GPGPARAMS -ab kanvas-core/build/pom.xml
gpg $GPGPARAMS -ab kanvas-core/build/libs/kanvas-core-${VERSION}.jar
gpg $GPGPARAMS -ab kanvas-core/build/libs/kanvas-core-${VERSION}-javadoc.jar
gpg $GPGPARAMS -ab kanvas-core/build/libs/kanvas-core-${VERSION}-sources.jar
cd kanvas-core/build/libs
jar -cvf bundle-kanvas-core.jar ../pom.xml ../pom.xml.asc kanvas-core-${VERSION}.jar kanvas-core-${VERSION}.jar.asc kanvas-core-${VERSION}-javadoc.jar kanvas-core-${VERSION}-javadoc.jar.asc kanvas-core-${VERSION}-sources.jar kanvas-core-${VERSION}-sources.jar.asc
cd ../../..
echo
echo PYTHON
echo
sed s/unspecified/$VERSION/g kanvas-python/build/pom.xml > kanvas-python/build/pom_corrected.xml
mv kanvas-python/build/pom_corrected.xml kanvas-python/build/pom.xml
gpg $GPGPARAMS -ab kanvas-python/build/pom.xml
gpg $GPGPARAMS -ab kanvas-python/build/libs/kanvas-python-${VERSION}.jar
gpg $GPGPARAMS -ab kanvas-python/build/libs/kanvas-python-${VERSION}-javadoc.jar
gpg $GPGPARAMS -ab kanvas-python/build/libs/kanvas-python-${VERSION}-sources.jar
cd kanvas-python/build/libs
jar -cvf bundle-kanvas-python.jar ../pom.xml ../pom.xml.asc kanvas-python-${VERSION}.jar kanvas-python-${VERSION}.jar.asc kanvas-python-${VERSION}-javadoc.jar kanvas-python-${VERSION}-javadoc.jar.asc kanvas-python-${VERSION}-sources.jar kanvas-python-${VERSION}-sources.jar.asc
cd ../../..
echo
echo SANDY
echo
sed s/unspecified/$VERSION/g kanvas-sandy/build/pom.xml > kanvas-sandy/build/pom_corrected.xml
mv kanvas-sandy/build/pom_corrected.xml kanvas-sandy/build/pom.xml
gpg $GPGPARAMS -ab kanvas-sandy/build/pom.xml
gpg $GPGPARAMS -ab kanvas-sandy/build/libs/kanvas-sandy-${VERSION}.jar
gpg $GPGPARAMS -ab kanvas-sandy/build/libs/kanvas-sandy-${VERSION}-javadoc.jar
gpg $GPGPARAMS -ab kanvas-sandy/build/libs/kanvas-sandy-${VERSION}-sources.jar
cd kanvas-sandy/build/libs
jar -cvf bundle-kanvas-sandy.jar ../pom.xml ../pom.xml.asc kanvas-sandy-${VERSION}.jar kanvas-sandy-${VERSION}.jar.asc kanvas-sandy-${VERSION}-javadoc.jar kanvas-sandy-${VERSION}-javadoc.jar.asc kanvas-sandy-${VERSION}-sources.jar kanvas-sandy-${VERSION}-sources.jar.asc
cd ../../..
mkdir -p release
mv kanvas-core/build/libs/bundle-kanvas-core.jar release
mv kanvas-python/build/libs/bundle-kanvas-python.jar release
mv kanvas-sandy/build/libs/bundle-kanvas-sandy.jar release