forked from javaparser/javasymbolsolver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pack.sh
60 lines (53 loc) · 4.7 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
52
53
54
55
56
57
58
59
60
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
mv java-symbol-solver-core/build/libs/java-symbol-solver-core.jar java-symbol-solver-core/build/libs/java-symbol-solver-core-${VERSION}.jar
mv java-symbol-solver-core/build/libs/java-symbol-solver-core-javadoc.jar java-symbol-solver-core/build/libs/java-symbol-solver-core-${VERSION}-javadoc.jar
mv java-symbol-solver-core/build/libs/java-symbol-solver-core-sources.jar java-symbol-solver-core/build/libs/java-symbol-solver-core-${VERSION}-sources.jar
sed s/unspecified/$VERSION/g java-symbol-solver-core/build/pom.xml > java-symbol-solver-core/build/pom_corrected.xml
mv java-symbol-solver-core/build/pom_corrected.xml java-symbol-solver-core/build/pom.xml
gpg $GPGPARAMS -ab java-symbol-solver-core/build/pom.xml
gpg $GPGPARAMS -ab java-symbol-solver-core/build/libs/java-symbol-solver-core-${VERSION}.jar
gpg $GPGPARAMS -ab java-symbol-solver-core/build/libs/java-symbol-solver-core-${VERSION}-javadoc.jar
gpg $GPGPARAMS -ab java-symbol-solver-core/build/libs/java-symbol-solver-core-${VERSION}-sources.jar
cd java-symbol-solver-core/build/libs
jar -cvf bundle-java-symbol-solver-core.jar ../pom.xml ../pom.xml.asc java-symbol-solver-core-${VERSION}.jar java-symbol-solver-core-${VERSION}.jar.asc java-symbol-solver-core-${VERSION}-javadoc.jar java-symbol-solver-core-${VERSION}-javadoc.jar.asc java-symbol-solver-core-${VERSION}-sources.jar java-symbol-solver-core-${VERSION}-sources.jar.asc
cd ../../..
echo
echo MODEL
echo
mv java-symbol-solver-model/build/libs/java-symbol-solver-model.jar java-symbol-solver-model/build/libs/java-symbol-solver-model-${VERSION}.jar
mv java-symbol-solver-model/build/libs/java-symbol-solver-model-javadoc.jar java-symbol-solver-model/build/libs/java-symbol-solver-model-${VERSION}-javadoc.jar
mv java-symbol-solver-model/build/libs/java-symbol-solver-model-sources.jar java-symbol-solver-model/build/libs/java-symbol-solver-model-${VERSION}-sources.jar
sed s/unspecified/$VERSION/g java-symbol-solver-model/build/pom.xml > java-symbol-solver-model/build/pom_corrected.xml
mv java-symbol-solver-model/build/pom_corrected.xml java-symbol-solver-model/build/pom.xml
gpg $GPGPARAMS -ab java-symbol-solver-model/build/pom.xml
gpg $GPGPARAMS -ab java-symbol-solver-model/build/libs/java-symbol-solver-model-${VERSION}.jar
gpg $GPGPARAMS -ab java-symbol-solver-model/build/libs/java-symbol-solver-model-${VERSION}-javadoc.jar
gpg $GPGPARAMS -ab java-symbol-solver-model/build/libs/java-symbol-solver-model-${VERSION}-sources.jar
cd java-symbol-solver-model/build/libs
jar -cvf bundle-java-symbol-solver-model.jar ../pom.xml ../pom.xml.asc java-symbol-solver-model-${VERSION}.jar java-symbol-solver-model-${VERSION}.jar.asc java-symbol-solver-model-${VERSION}-javadoc.jar java-symbol-solver-model-${VERSION}-javadoc.jar.asc java-symbol-solver-model-${VERSION}-sources.jar java-symbol-solver-model-${VERSION}-sources.jar.asc
cd ../../..
echo
echo LOGIC
echo
mv java-symbol-solver-logic/build/libs/java-symbol-solver-logic.jar java-symbol-solver-logic/build/libs/java-symbol-solver-logic-${VERSION}.jar
mv java-symbol-solver-logic/build/libs/java-symbol-solver-logic-javadoc.jar java-symbol-solver-logic/build/libs/java-symbol-solver-logic-${VERSION}-javadoc.jar
mv java-symbol-solver-logic/build/libs/java-symbol-solver-logic-sources.jar java-symbol-solver-logic/build/libs/java-symbol-solver-logic-${VERSION}-sources.jar
sed s/unspecified/$VERSION/g java-symbol-solver-logic/build/pom.xml > java-symbol-solver-logic/build/pom_corrected.xml
mv java-symbol-solver-logic/build/pom_corrected.xml java-symbol-solver-logic/build/pom.xml
gpg $GPGPARAMS -ab java-symbol-solver-logic/build/pom.xml
gpg $GPGPARAMS -ab java-symbol-solver-logic/build/libs/java-symbol-solver-logic-${VERSION}.jar
gpg $GPGPARAMS -ab java-symbol-solver-logic/build/libs/java-symbol-solver-logic-${VERSION}-javadoc.jar
gpg $GPGPARAMS -ab java-symbol-solver-logic/build/libs/java-symbol-solver-logic-${VERSION}-sources.jar
cd java-symbol-solver-logic/build/libs
jar -cvf bundle-java-symbol-solver-logic.jar ../pom.xml ../pom.xml.asc java-symbol-solver-logic-${VERSION}.jar java-symbol-solver-logic-${VERSION}.jar.asc java-symbol-solver-logic-${VERSION}-javadoc.jar java-symbol-solver-logic-${VERSION}-javadoc.jar.asc java-symbol-solver-logic-${VERSION}-sources.jar java-symbol-solver-logic-${VERSION}-sources.jar.asc
cd ../../..
mkdir -p release
mv java-symbol-solver-core/build/libs/bundle-java-symbol-solver-core.jar release
mv java-symbol-solver-model/build/libs/bundle-java-symbol-solver-model.jar release
mv java-symbol-solver-logic/build/libs/bundle-java-symbol-solver-logic.jar release