forked from galenframework/galen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakeDist.sh
executable file
·50 lines (30 loc) · 835 Bytes
/
makeDist.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
#!/bin/bash
set -e
if [ -d dist ]; then
rm -rf dist/*
fi
modules=(galen-core galen-rainbow4j galen-java-support)
version=$( cat pom.xml | grep "<version>" | head -n 1 | awk -F"[<>]" '/version/{print $3}' | sed "s/-SNAPSHOT//g" )
bin=galen-bin-${version}
src=galen-src-${version}
mkdir -p dist/$bin
mkdir -p dist/$src
echo New dist is $version
echo Assemblying new dist
mvn clean package -DskipTests=true
cp galen-distribution/target/galen-bin.jar dist/$bin/galen.jar
cp -r fordist/* dist/$bin/.
cp .README dist/$bin/README
cp CHANGELOG.md dist/$bin/.
cp LICENSE-2.0.txt dist/$src/.
cp .README dist/$src/README
cp CHANGELOG.md dist/$src/.
for module in "${modules[@]}"
do
mkdir dist/$src/$module
cp -r $module/src dist/$src/$module/src
done
cd dist
zip -r -9 $bin.zip $bin
zip -r -9 $src.zip $src
cd ..