Update build scripts, Automate version number

This commit is contained in:
Manfred Karrer 2015-03-05 20:36:42 +01:00
parent 35f45138d2
commit 5a6c7ee89d
24 changed files with 257 additions and 830 deletions

View file

@ -11,7 +11,7 @@
<key>CFBundleExecutable</key>
<string>Bitsquare</string>
<key>CFBundleIconFile</key>
<string>Bitsquare.icns</string>
<string>package/mac/Bitsquare.icns</string>
<key>CFBundleIdentifier</key>
<string>io.bitsquare</string>
<key>CFBundleInfoDictionaryVersion</key>

View file

@ -0,0 +1,56 @@
<?xml version="1.0" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSMinimumSystemVersion</key>
<string>10.7.4</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleExecutable</key>
<string>Bitsquare</string>
<key>CFBundleIconFile</key>
<string>package/mac/Bitsquare.icns</string>
<key>CFBundleIdentifier</key>
<string>io.bitsquare</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Bitsquare</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>19</string>
<key>CFBundleSignature</key>
<string>????</string>
<!-- See http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html
for list of AppStore categories -->
<key>LSApplicationCategoryType</key>
<string>Unknown</string>
<key>CFBundleVersion</key>
<string>100</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright (C) 2015</string>
<key>JVMRuntime</key>
<string>..</string>
<key>JVMMainClassName</key>
<string>io.bitsquare.app.gui.BitsquareAppMain</string>
<key>JVMAppClasspath</key>
<string></string>
<key>JVMMainJarName</key>
<string>JAR_NAME_STRING_GOES_HERE</string>
<key>JVMPreferencesID</key>
<string>bitsquare</string>
<key>JVMOptions</key>
<array>
</array>
<key>JVMUserOptions</key>
<dict>
</dict>
<key>NSHighResolutionCapable</key>
<string>true</string>
</dict>
</plist>

View file

@ -1,26 +0,0 @@
#!/bin/bash
cd ../../
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
cp gui/target/shaded.jar gui/updatefx/builds/1.jar
# edit url
java -jar ./updatefx/updatefx-app-1.2.jar --url=http://localhost:8000/ gui/updatefx
$JAVA_HOME/bin/javapackager \
-deploy \
-BappVersion=0.1.1-SNAPSHOT \
-Bmac.CFBundleIdentifier=io.bitsquare \
-Bmac.CFBundleName=Bitsquare \
-Bicon=BitsquareLICENSE.icns \
-Bruntime="$JAVA_HOME/../../" \
-native dmg \
-name Bitsquare \
-title Bitsquare \
-vendor Bitsquare \
-outdir gui/deploy \
-srcfiles gui/updatefx/builds/processed/1.jar \
-appclass io.bitsquare.app.gui.BitsquareAppMain \
-outfile Bitsquare
cd package/mac

View file

@ -1,21 +0,0 @@
#!/bin/bash
# setup dirs
cd ../../
mkdir gui/updatefx
mkdir gui/updatefx/builds
mkdir gui/updatefx/builds/processed
mkdir gui/updatefx/site
mkdir gui/deploy
# create key/wallet. Copy wallet to UpdateProcess or use wallet form other OS build
java -jar ./updatefx/updatefx-app-1.2.jar --url=http://localhost:8000/ gui/updatefx
cd package/mac
# start webserver for update data
# cd ../../gui/updatefx/site
# python -m SimpleHTTPServer 8000
# create icons
# iconutil -c icns package/bitsquare.iconset

View file

@ -1,12 +0,0 @@
#!/bin/bash
cd ../../
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
# edit version /*.jar
cp gui/target/shaded.jar gui/updatefx/builds/2.jar
# edit url
java -jar ./updatefx/updatefx-app-1.2.jar --url=http://localhost:8000/ gui/updatefx
cd package/mac

43
package/mac/create_app.sh Normal file
View file

@ -0,0 +1,43 @@
#!/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
buildVersion=$( sed -n 's/^.*final int BUILD_VERSION = //p' gui/src/main/java/io/bitsquare/app/gui/UpdateProcess.java )
# remove trailing;
buildVersion="${buildVersion:0:${#buildVersion}-1}"
fullVersion=$( sed -n 's/^.*final String VERSION = "//p' gui/src/main/java/io/bitsquare/app/gui/BitsquareAppMain.java )
# remove trailing ";
fullVersion="${fullVersion:0:${#fullVersion}-2}"
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
cp gui/target/shaded.jar gui/updatefx/builds/$buildVersion.jar
java -jar ./updatefx/updatefx-app-1.2.jar --url=http://bitsquare.io/updateFX/ gui/updatefx
$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 \
-outdir gui/deploy \
-srcfiles gui/updatefx/builds/processed/$buildVersion.jar \
-appclass io.bitsquare.app.gui.BitsquareAppMain \
-outfile Bitsquare
cd package/mac

17
package/mac/setup.sh Normal file
View file

@ -0,0 +1,17 @@
#!/bin/bash
# setup dirs
cd ../../
mkdir gui/updatefx
mkdir gui/updatefx/builds
mkdir gui/updatefx/builds/processed
mkdir gui/updatefx/site
mkdir gui/deploy
# create key/wallet. Copy wallet key to UpdateProcess and use wallet for other OS builds
java -jar ./updatefx/updatefx-app-1.2.jar --url=http://bitsquare.io/updateFX/ gui/updatefx
cd package/mac
# create icons
# iconutil -c icns package/bitsquare.iconset

17
package/mac/update.sh Normal file
View file

@ -0,0 +1,17 @@
#!/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
buildVersion=$( sed -n 's/^.*final int BUILD_VERSION = //p' gui/src/main/java/io/bitsquare/app/gui/UpdateProcess.java )
# remove trailing;
buildVersion="${buildVersion:0:${#buildVersion}-1}"
echo buildVersion = $buildVersion
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
cp gui/target/shaded.jar gui/updatefx/builds/$buildVersion.jar
java -jar ./updatefx/updatefx-app-1.2.jar --url=http://bitsquare.io/updateFX/ gui/updatefx
cd package/mac