2015-03-05 20:36:42 +01:00
#!/bin/bash
cd ../../
set -e
# Extract the version number. buildVersion is used for ever increasing integer at UpdateFX. fullVersion contains major and minor version + buildVersion
2015-03-28 23:12:18 +01:00
buildVersion = $( sed -n 's/^.*final int BUILD_VERSION = //p' core/src/main/java/io/bitsquare/app/UpdateProcess.java )
2015-03-05 20:36:42 +01:00
# remove trailing;
buildVersion = " ${ buildVersion : 0 : ${# buildVersion } -1 } "
2015-03-28 23:12:18 +01:00
fullVersion = $( sed -n 's/^.*final String VERSION = "//p' core/src/main/java/io/bitsquare/app/BitsquareAppMain.java )
2015-03-05 20:36:42 +01:00
# remove trailing ";
2015-03-05 22:19:48 +01:00
fullVersion = " ${ fullVersion : 0 : ${# fullVersion } -2 } " .$buildVersion
2015-03-05 20:36:42 +01:00
echo buildVersion = $buildVersion
echo fullVersion = $fullVersion
# Generate the plist from the template
sed " s|JAR_NAME_STRING_GOES_HERE| $buildVersion .jar| " package/mac/Info.template.plist >package/mac/Info.plist
mvn clean package -DskipTests -Dmaven.javadoc.skip= true
2015-03-28 23:12:18 +01:00
cp core/target/shaded.jar core/updatefx/builds/$buildVersion .jar
2015-03-05 20:36:42 +01:00
2015-03-28 23:12:18 +01:00
java -jar ./updatefx/updatefx-app-1.2.jar --url= http://bitsquare.io/updateFX/ core/updatefx
2015-03-05 20:36:42 +01:00
$JAVA_HOME /bin/javapackager \
-deploy \
-BappVersion= $fullVersion \
-Bmac.CFBundleIdentifier= io.bitsquare \
-Bmac.CFBundleName= Bitsquare \
-Bicon= package/mac/Bitsquare.icns \
-Bruntime= " $JAVA_HOME /../../ " \
-native dmg \
-name Bitsquare \
-title Bitsquare \
-vendor Bitsquare \
2015-03-28 23:12:18 +01:00
-outdir core/deploy \
-srcfiles core/updatefx/builds/processed/$buildVersion .jar \
-appclass io.bitsquare.app.core.BitsquareAppMain \
2015-03-05 20:36:42 +01:00
-outfile Bitsquare
cd package/mac