Browse Source

Fixed A shell script that I had modified but accidentally restored from a previous commit. Working on getting versioning working again

master
Drew Short 10 years ago
parent
commit
6930ac3af1
  1. 29
      build/linux/package.sh
  2. 2
      pom.xml

29
build/linux/package.sh

@ -1,8 +1,15 @@
#!/bin/bash
#Move out of the build folder
cd ../..
packageProject ()
{
VERSION=$1
RELEASE=$3
ROOT=$PWD
cd $2
#Getting variables that are produced by the script
VERSION=$(head -1 ./version.info)
NAME=$(head -1 ./name.info)
PACKAGENAME=$NAME-$VERSION
PACKAGETAR=$PACKAGENAME.tar.gz
@ -12,10 +19,26 @@ TARGET=$PWD/target
#Packaging Jar Distributable
cd target/release/
echo "creating $PACKAGETAR in $TARGET"
tar -zcvf $TARGET/$PACKAGETAR .
tar -zcvf $RELEASE/$PACKAGETAR .
echo "creating $PACKAGEZIP in $TARGET"
zip -r $TARGET/$PACKAGEZIP ./*
zip -r $RELEASE/$PACKAGEZIP ./*
#Removing prebuilt jar in target
rm $TARGET/*.jar
#Copying Jar to target for archiving
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

2
pom.xml

@ -4,7 +4,7 @@
<groupId>com.sothr.imagetools</groupId>
<artifactId>Image-Tools</artifactId>
<version>0.1.1-DEV</version>
<version>0.1.2-DEV</version>
<packaging>pom</packaging>
<name>Image-Tools</name>

Loading…
Cancel
Save