|
@ -1,8 +1,15 @@ |
|
|
#!/bin/bash |
|
|
#!/bin/bash |
|
|
#Move out of the build folder |
|
|
#Move out of the build folder |
|
|
cd ../.. |
|
|
cd ../.. |
|
|
|
|
|
|
|
|
|
|
|
packageProject () |
|
|
|
|
|
{ |
|
|
|
|
|
VERSION=$1 |
|
|
|
|
|
RELEASE=$3 |
|
|
|
|
|
ROOT=$PWD |
|
|
|
|
|
cd $2 |
|
|
|
|
|
|
|
|
#Getting variables that are produced by the script |
|
|
#Getting variables that are produced by the script |
|
|
VERSION=$(head -1 ./version.info) |
|
|
|
|
|
NAME=$(head -1 ./name.info) |
|
|
NAME=$(head -1 ./name.info) |
|
|
PACKAGENAME=$NAME-$VERSION |
|
|
PACKAGENAME=$NAME-$VERSION |
|
|
PACKAGETAR=$PACKAGENAME.tar.gz |
|
|
PACKAGETAR=$PACKAGENAME.tar.gz |
|
@ -12,10 +19,26 @@ TARGET=$PWD/target |
|
|
#Packaging Jar Distributable |
|
|
#Packaging Jar Distributable |
|
|
cd target/release/ |
|
|
cd target/release/ |
|
|
echo "creating $PACKAGETAR in $TARGET" |
|
|
echo "creating $PACKAGETAR in $TARGET" |
|
|
tar -zcvf $TARGET/$PACKAGETAR . |
|
|
|
|
|
|
|
|
tar -zcvf $RELEASE/$PACKAGETAR . |
|
|
echo "creating $PACKAGEZIP in $TARGET" |
|
|
echo "creating $PACKAGEZIP in $TARGET" |
|
|
zip -r $TARGET/$PACKAGEZIP ./* |
|
|
|
|
|
|
|
|
zip -r $RELEASE/$PACKAGEZIP ./* |
|
|
#Removing prebuilt jar in target |
|
|
#Removing prebuilt jar in target |
|
|
rm $TARGET/*.jar |
|
|
rm $TARGET/*.jar |
|
|
#Copying Jar to target for archiving |
|
|
#Copying Jar to target for archiving |
|
|
cp ./*.jar $TARGET |
|
|
cp ./*.jar $TARGET |
|
|
|
|
|
|
|
|
|
|
|
cd $ROOT |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#Getting variables that are produced by the script |
|
|
|
|
|
VERSION=$(head -1 ./version.info) |
|
|
|
|
|
RELEASE="$PWD/target" |
|
|
|
|
|
|
|
|
|
|
|
#make sure release exists |
|
|
|
|
|
if [ ! -d $RELEASE ]; then |
|
|
|
|
|
mkdir $RELEASE |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
packageProject $VERSION "./cli" $RELEASE |
|
|
|
|
|
packageProject $VERSION "./gui" $RELEASE |
|
|
|
|
|
#packageProject $VERSION "./daemon" $RELEASE |