-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·51 lines (42 loc) · 827 Bytes
/
release.sh
File metadata and controls
executable file
·51 lines (42 loc) · 827 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
#!/bin/sh
VERSION=0.2.0
DIST="dist/codebone-$VERSION"
#Clean
rm -rf $DIST
#Build
mvn clean package
#Make dirs.
mkdir -p $DIST
#Make generator
cp -r generator/target/codebone-*.jar $DIST
cp -r generator/target/lib $DIST/lib
#Make server
cd site
mvn clean
cd ..
cp -r site $DIST/site
#Make android
cd android
mvn clean
cd ..
cp -r android $DIST/android
#Make bin
cp -r bin $DIST/bin
#Zipping
cd dist
zip -r codebone-$VERSION.zip codebone-$VERSION
cd ..
ls -al dist
if [ "$1" == "deploy" ]; then
echo "Start release flow : codebone-$VERSION"
mvn clean
cp dist/codebone-$VERSION.zip ../
git checkout gh-pages
git reset HEAD --hard
rm -rf release/codebone-$VERSION.zip
mv ../codebone-$VERSION.zip release
git add .
git commit -m "release codebone $VERSION"
git push
echo "End release flow : codebone-$VERSION"
fi