diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5cb55fb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: java +os: osx +osx_image: xcode9.1 +script: ./gradlew dmg +after_success: ./publish.sh \ No newline at end of file diff --git a/README.md b/README.md index 9d26eae..8521ac3 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ +[![Build Status](https://travis-ci.org/brailleapps/dotify-studio-installer.svg?branch=master)](https://travis-ci.org/brailleapps/dotify-studio-installer) # Dotify Studio Installer # -Provides an installer för Dotify Studio, a graphical user interface for embossing PEF-files. +Provides an installer för Dotify Studio, a graphical user interface for creating, managing and embossing PEF-files. ## Building ## Build an installer on the target platform with the corresponding command. | Platform | Command | | :---------| :------------------------------- | -| Windows | `gradlew msi` | +| Windows (x64) | `gradlew msi` | +| Windows (x86) | `gradlew msi32` | | Linux | `./gradlew rpm` | | Linux | `./gradlew deb` | | maOS | `./gradlew dmg` | diff --git a/ant-build/resources/app-icon.ico b/ant-build/resources/app-icon.ico index da2e4cd..efea350 100644 Binary files a/ant-build/resources/app-icon.ico and b/ant-build/resources/app-icon.ico differ diff --git a/ant-build/resources/longDesc_en.txt b/ant-build/resources/longDesc_en.txt new file mode 100644 index 0000000..3c46e62 --- /dev/null +++ b/ant-build/resources/longDesc_en.txt @@ -0,0 +1 @@ +Dotify Studio is an application for creating, managing and embossing PEf-files. diff --git a/build.gradle b/build.gradle index 9c091c5..0c26ab0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id "de.inetsoftware.setupbuilder" version "1.8.0" + id "de.inetsoftware.setupbuilder" version "3.4.3" } apply plugin: 'base' @@ -112,11 +112,13 @@ configure( [msi, msi32] ) { configure( [deb, rpm] ) { doFirst { setupBuilder { - desktopStarter { - executable = "bin/dotify-studio" - location = "ApplicationMenu" - categories = "Office" - } + defaultResourceLanguage 'en' + longDescription 'ant-build/resources/longDesc_en.txt' + desktopStarter { + executable = "bin/dotify-studio" + location = "ApplicationMenu" + categories = "Office" + } } } } @@ -129,6 +131,7 @@ rpm.dependsOn('unzip', 'copyPlugins') deb { maintainerEmail = 'joel.hakansson@mtm.se' + section = 'text' postinst = 'chmod +x /usr/share/dotify-studio/bin/dotify-studio' } @@ -138,5 +141,5 @@ rpm { task wrapper(type: Wrapper, description: 'Refreshes the gradle wrapper') { - gradleVersion = '3.0' -} \ No newline at end of file + gradleVersion = '3.5' +} diff --git a/gradle.properties b/gradle.properties index cfcf944..520a7fe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -releaseName=Dotify Studio -version=0.5.0 \ No newline at end of file +version=0.6.0 +releaseName=Dotify Studio \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d786299..7869c91 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Jun 28 19:30:48 CEST 2017 +#Tue Nov 21 12:56:34 CET 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..6014b5d --- /dev/null +++ b/publish.sh @@ -0,0 +1,51 @@ +#!/bin/bash +#version: 2017-11-18 + +repo=dotify-studio-installer +version=`grep 'version=' gradle.properties | grep -E -o '[0-9\.]+.+$'` +if [[ $version == *SNAPSHOT ]]; then + is_release=false +else + is_release=true +fi +if [ `git diff --name-only HEAD HEAD~ | grep gradle.properties -c` = 1 ]; then + prop_change="true" +else + prop_change="false" +fi + +echo "Version: $version" +echo "Is release: $is_release" +echo "Properties changed: $prop_change" + +if [ "$prop_change" = "false" ]; then + if [ "$is_release" = "true" ]; then + echo "No version change since last commit. Is this really a release?" + exit 1 + fi +fi + +if [ "$TRAVIS_REPO_SLUG" == "brailleapps/$repo" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$is_release" = true ]; then + + echo -e "Publishing...\n" + + mkdir -p $HOME/$repo/$version + cp -R build/distributions/* $HOME/$repo/$version + + cd $HOME + git config --global user.email "travis@travis-ci.org" + git config --global user.name "travis-ci" + git clone --quiet https://${GH_TOKEN}@github.com/brailleapps/brailleapps.github.io > /dev/null + + cd brailleapps.github.io + git rm -rf ./$repo/$version + + cp -Rf $HOME/$repo/. ./$repo + + git add -f . + git commit -m "Lastest successful travis build of $repo ($TRAVIS_BUILD_NUMBER) auto-pushed to brailleapps.github.io" + git push -fq origin master > /dev/null + + echo -e "Published artifacts to brailleapps.github.io.\n" + +fi