Skip to content

Commit

Permalink
Changes to scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
agbeltran committed Sep 22, 2016
1 parent 3c1cb6f commit 7693867
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -77,3 +77,4 @@ Thumbs.db
Configurations/
isatab files/
src/main/resources/Configurations/
Plugins/
2 changes: 1 addition & 1 deletion bundler.py
Expand Up @@ -38,7 +38,7 @@
'<key>Java</key>'\
'<dict>'\
'<key>VMOptions</key>'\
'<string>-Xms256m -Xmx1024m</string>'\
'<string>-Xms256mm -Xmx1024mm</string>'\
'<key>MainClass</key>'\
'<string>org.isatools.isacreator.launch.ISAcreatorApplication</string>'\
'<key>JVMVersion</key>'\
Expand Down
9 changes: 8 additions & 1 deletion compile.sh
Expand Up @@ -43,6 +43,13 @@ fi

curl -L -O http://bitbucket.org/eamonnmag/isatools-downloads/downloads/"$CONFIG_FILES"

mkdir Configurations
cp $CONFIG_FILES ./Configurations
cd Configurations
unzip $CONFIG_FILES
rm -f $CONFIG_FILES
cd ..

mv $CONFIG_FILES src/main/resources/Configurations/

WD=$(pwd)
Expand Down Expand Up @@ -76,7 +83,7 @@ then
rm -f $MIXS_DATASETS
cd ../
else
cp -r src/test/resources/test-data/* "isatab files"/
cp -r src/test/resources/test-data/ "isatab files"/
fi


24 changes: 17 additions & 7 deletions package.sh
Expand Up @@ -68,19 +68,28 @@ fi

curl -L -O http://bitbucket.org/eamonnmag/isatools-downloads/downloads/"$CONFIGURATION"

mkdir Configurations
cp $CONFIGURATION
cd Configurations
unzip $CONFIGURATION
rm -f $CONFIGURATION
cd ..

#back to project folder

cp $CONFIGURATION src/main/resources/Configurations/

#project folder
WD=$(pwd)

pwd
cd src/main/resources/Configurations/
unzip $CONFIGURATION

rm -f $CONFIGURATION
pwd

cd $WD
echo "Changing back to target..."
echo "Changing back to project folder..."
pwd

##Building ISAcreator
Expand All @@ -91,7 +100,6 @@ if [ "$?" -ne 0 ]; then
exit 1
fi


mkdir target/Configurations
cp $CONFIGURATION target/Configurations/
rm -f $CONFIGURATION
Expand All @@ -100,9 +108,11 @@ cd target/Configurations/
unzip $CONFIGURATION
rm -f $CONFIGURATION

# Now package up the tools
cd ../
cd ..

#in target folder

# Now package up the tools
mkdir "isatab files"
if [ "$PACKAGE_TYPE" = "scidata" ]
then
Expand All @@ -120,7 +130,7 @@ then
rm -f $MIXS_DATASETS
cd ../
else
cp -r ../"isatab files"/* "isatab files"
cp -r ../src/test/resources/test-data/ ./"isatab files"
fi

pwd
Expand All @@ -137,6 +147,6 @@ echo "Packaging completed successfully!"
mkdir ISAcreator-$VERSION-dmg-folder/
mkdir ISAcreator-$VERSION-dmg-folder/ISAcreator-$VERSION
mv ISAcreator.app ISAcreator-$VERSION-dmg-folder/ISAcreator-$VERSION
cp -r Configurations ISAcreator-$VERSION-dmg-folder/ISAcreator-$VERSION
cp -r ../src/main/resources/Configurations ISAcreator-$VERSION-dmg-folder/ISAcreator-$VERSION
cp -r ../ProgramData ISAcreator-$VERSION-dmg-folder/ISAcreator-$VERSION
cp -r "isatab files" ISAcreator-$VERSION-dmg-folder/ISAcreator-$VERSION
28 changes: 28 additions & 0 deletions run.sh
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

get_tag_data () {
local tag=$1
local xml_file=$2

# Find tag in the xml, convert tabs to spaces, remove leading spaces, remove the tag.
grep $tag $xml_file | \
tr '\011' '\040' | \
sed -e 's/^[ ]*//' \
-e 's/^<.*>\([^<].*\)<.*>$/\1/'

}


ALLVERSIONS=`get_tag_data \<version\> pom.xml 2>/dev/null`

VERSIONSPLIT=(`echo $ALLVERSIONS | tr ' ' ' '`)
# get first version number referenced. Should always be the version of the project, since it's always the first
VERSION=${VERSIONSPLIT[0]}

if [ "$VERSION" = "" ]
then
echo "Couldn't extract version from pom.xml. Exiting."
exit 1
fi

java -cp target/ISAcreator-$VERSION.jar org.isatools.isacreator.launch.ISAcreatorApplication

0 comments on commit 7693867

Please sign in to comment.