forked from sysart/dtangler
-
Notifications
You must be signed in to change notification settings - Fork 3
/
create_release_packages.sh
63 lines (45 loc) · 1.83 KB
/
create_release_packages.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
61
#!/bin/sh
export PATH=$PATH:/usr/local/bin
set -e
SOURCE_DIR=$1
BUILD_DIR=$2
RELEASE_DIR=$3
if [ ! -d "$SOURCE_DIR" ] | [ ! -d "$BUILD_DIR" ] | [ ! -d "$RELEASE_DIR" ]
then
echo "Usage: create_release_packages.sh <sourcedir> <builddir> <releasedir>"
echo "given paths must exist"
exit
fi
###################### DOCUMENTATION #####################
#TODO: fix this, temporary solution
mv $SOURCE_DIR/target/site $RELEASE_DIR/documentation
rm -rf $SOURCE_DIR/target
###################### CORE_PACKAGE #####################
CORE_RELEASE_BUILD_DIR=$BUILD_DIR/core-release
rm -rf $CORE_RELEASE_BUILD_DIR
mkdir $CORE_RELEASE_BUILD_DIR
cp $SOURCE_DIR/LICENSE.txt $CORE_RELEASE_BUILD_DIR
cp -r $RELEASE_DIR/documentation $CORE_RELEASE_BUILD_DIR
cp $RELEASE_DIR/dtangler-core.jar $CORE_RELEASE_BUILD_DIR
cd $CORE_RELEASE_BUILD_DIR
zip -r dtangler-core.zip *
cd -
cp $CORE_RELEASE_BUILD_DIR/dtangler-core.zip $RELEASE_DIR
###################### SWINGUI PACKAGE #####################
SWINGUI_RELEASE_BUILD_DIR=$BUILD_DIR/swingui-release
rm -rf $SWINGUI_RELEASE_BUILD_DIR
mkdir $SWINGUI_RELEASE_BUILD_DIR
cp $SOURCE_DIR/LICENSE.txt $SWINGUI_RELEASE_BUILD_DIR
cp -r $RELEASE_DIR/documentation $SWINGUI_RELEASE_BUILD_DIR
cp $SOURCE_DIR/dtangler-swingui/dsmgui.bat $SWINGUI_RELEASE_BUILD_DIR
cp $SOURCE_DIR/dtangler-swingui/dsmgui.sh $SWINGUI_RELEASE_BUILD_DIR
mkdir $SWINGUI_RELEASE_BUILD_DIR/lib-forms
cp $SOURCE_DIR/lib-forms/forms-1.2.0.jar $SWINGUI_RELEASE_BUILD_DIR/lib-forms
cp $SOURCE_DIR/lib-forms/LICENSE.txt $SWINGUI_RELEASE_BUILD_DIR/lib-forms
cp $RELEASE_DIR/dtangler-gui.jar $SWINGUI_RELEASE_BUILD_DIR
cd $SWINGUI_RELEASE_BUILD_DIR
zip -r dtangler-gui.zip *
cd -
cp $SWINGUI_RELEASE_BUILD_DIR/dtangler-gui.zip $RELEASE_DIR
###################### SRC_PACKAGE #####################
zip -r $RELEASE_DIR/dtangler-src.zip $SOURCE_DIR/* -x@src-exclude.lst