From 95ce6bed4a8869c4490b72ac358d3a03b22bae19 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 12 Sep 2019 18:20:46 +0200 Subject: [PATCH 01/56] Initial try --- .github/workflows/gradle.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 00000000000..97bebbdcd3c --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,34 @@ +name: Deployment + +on: [push, pull_request] + +jobs: + deploy: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + include: + - os: ubuntu-latest + displayName: linux + - os: windows-latest + displayName: windows + - os: macOS-latest + displayName: macOS + + runs-on: ${{ matrix.os }} + name: Deploy on ${{ matrix.os }} + + steps: + - uses: actions/checkout@v1 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 11.0.4 + - name: Build with Gradle + run: ./gradlew jlink + - name: Save artifact + uses: actions/upload-artifact@master + with: + name: JabRef-${{ displayName }} + path: build/image + From 6ce5b359d94212a26f4d4473b2b0fa00b4f777b0 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 12 Sep 2019 18:25:55 +0200 Subject: [PATCH 02/56] Update gradle.yml --- .github/workflows/gradle.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 97bebbdcd3c..125ee5c0f0a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,6 +1,6 @@ name: Deployment -on: [push, pull_request] +on: [push] jobs: deploy: @@ -16,7 +16,7 @@ jobs: displayName: macOS runs-on: ${{ matrix.os }} - name: Deploy on ${{ matrix.os }} + name: Deploy on ${{ matrix.displayName }} steps: - uses: actions/checkout@v1 @@ -29,6 +29,6 @@ jobs: - name: Save artifact uses: actions/upload-artifact@master with: - name: JabRef-${{ displayName }} + name: JabRef-${{ matrix.displayName }} path: build/image From 75bc0346e34eb5250e97bdf041a36a3248bd64e7 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 12 Sep 2019 19:01:56 +0200 Subject: [PATCH 03/56] Post to build.jabref.org --- .github/workflows/gradle.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 125ee5c0f0a..8538164c1f7 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -19,16 +19,27 @@ jobs: name: Deploy on ${{ matrix.displayName }} steps: - - uses: actions/checkout@v1 + - name: Checkout source + uses: actions/checkout@v1 - name: Set up JDK uses: actions/setup-java@v1 with: java-version: 11.0.4 - name: Build with Gradle - run: ./gradlew jlink + run: ./gradlew jlinkZip - name: Save artifact uses: actions/upload-artifact@master with: name: JabRef-${{ matrix.displayName }} path: build/image + - name: Upload to build.jabref.org + uses: garygrossgarten/github-action-scp@release + with: + local: build/image.zip + remote: JabRef-${{ matrix.displayName }}.zip + host: build-upload.jabref.org + username: builds_jabref_org + privateKey: ${{ secrets.buildJabRefPrivateKey }} + port: 9922 +} From 92c970011ba735b3ca66b9e91f22ea747c42d430 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 12 Sep 2019 19:05:03 +0200 Subject: [PATCH 04/56] Update gradle.yml --- .github/workflows/gradle.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8538164c1f7..5d98581f836 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -34,12 +34,12 @@ jobs: path: build/image - name: Upload to build.jabref.org uses: garygrossgarten/github-action-scp@release - with: - local: build/image.zip - remote: JabRef-${{ matrix.displayName }}.zip - host: build-upload.jabref.org - username: builds_jabref_org - privateKey: ${{ secrets.buildJabRefPrivateKey }} - port: 9922 + with: + local: build/image.zip + remote: JabRef-${{ matrix.displayName }}.zip + host: build-upload.jabref.org + username: builds_jabref_org + privateKey: ${{ secrets.buildJabRefPrivateKey }} + port: 9922 } From 70d6325b323b7aba3602c9c9380c8b98666f7312 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 12 Sep 2019 19:05:28 +0200 Subject: [PATCH 05/56] Delete upload-to-builds.jabref.org.sh --- scripts/upload-to-builds.jabref.org.sh | 51 -------------------------- 1 file changed, 51 deletions(-) delete mode 100755 scripts/upload-to-builds.jabref.org.sh diff --git a/scripts/upload-to-builds.jabref.org.sh b/scripts/upload-to-builds.jabref.org.sh deleted file mode 100755 index 5e49c2c577c..00000000000 --- a/scripts/upload-to-builds.jabref.org.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# We assume that there is a single build in build/releases -# We take out the branch name from the first matching file and then upload everything - -# just to be sure -branch="snapshot" - -# simple solution to treat first file matching a pattern -# hint by http://unix.stackexchange.com/a/156207/18033 -for buildfile in build/releases/*--snapshot--*; do - # the last "--" part is the branch name - branch=`echo $buildfile | sed "sX.*--\(.*\)--.*X\1X"` - break; -done - -for buildfile in build/releases/*--snapshot--*.jar; do - # remove build/releases/ from the filename - jarname=`echo $buildfile | sed "sXbuild/releases/XX"` - break; -done - -# now the branch name is in the variable "branch" - -command="cd www/\n" - -# if there was a branch determined, create that directory -# the for returns the literal string "build/releases/*--snapshot--*" if no file was found -# then, "snapshot" is extracted -if [ "snapshot" != "$branch" ] ; then - # change into dir and delete old snapshots - command="${command}mkdir $branch\ncd $branch\nrm *.dmg\nrm *.jar\nrm *.exe\n" -fi - -# only upload JabRef*, not md5sums, updates.xml, etc. -command="${command}mput build/releases/JabRef*\n" - -# create symlink ...--latest.jar to latest version -command="${command}symlink ${jarname} /www/${branch}/JabRef--${branch}--latest.jar\n" - -command="${command}exit\n" - -# now $command is complete - -# add host key of build-upload.jabref.org to SSH known hosts -cat <> ~/.ssh/known_hosts -|1|/E0gFRKMKG83OQVcwqFPIy3mnE4=|tLYRVZQ/3nCkBTZ9NtBVxx3si+Y= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNjYLP9C+PhQrpKfYsdgr8dDB/50S3BnaXAYQOVC5o3H0SqKisWw8iTkij/u8H20Rmsf/ABduOLPOBubfPFlE34= -|1|dEeue80RCldo/x5XyhbGIkS72d8=|09t8muprLf6YoXsc3r3kxicBykI= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNjYLP9C+PhQrpKfYsdgr8dDB/50S3BnaXAYQOVC5o3H0SqKisWw8iTkij/u8H20Rmsf/ABduOLPOBubfPFlE34= -EOF - -echo -e "$command" | sftp -P 9922 builds_jabref_org@build-upload.jabref.org From cc16838b42f97f996f52dc790cc77b1b5b9399b7 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 12 Sep 2019 19:06:41 +0200 Subject: [PATCH 06/56] Delete config.yml --- .circleci/config.yml | 85 -------------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 3fb7d9c9858..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: 2 - -jobs: - prepareinstall4j: - docker: - - image: circleci/openjdk:11.0.3-jdk-stretch - steps: - - checkout - - restore_cache: - keys: - - install4j-{{ checksum "scripts/prepare-install4j.sh" }} - - run: scripts/prepare-install4j.sh - - save_cache: - key: install4j-{{ checksum "scripts/prepare-install4j.sh" }} - paths: - - "~/.install4j8" - filters: - tags: - only: /.*/ - - buildDev: - docker: - - image: circleci/openjdk:11.0.4-jdk-stretch - steps: - - checkout - - restore_cache: - key: install4j-{{ checksum "scripts/prepare-install4j.sh" }} - - run: scripts/prepare-install4j.sh - - run: install4j8/bin/install4jc --verbose --license=$INSTALL4J8_KEY - - restore_cache: - key: gradle - - run: git submodule sync - - run: git submodule update --init - - run: ./gradlew -Pdev=true -Pinstall4jDir="install4j8" release --stacktrace - - run: ./gradlew jlink - - run: mv build/image jabref - - run: tar cvzf JabRef-linux-${CIRCLE_BRANCH}-latest.tar.gz jabref - - run: mv JabRef-linux-${CIRCLE_BRANCH}-latest.tar.gz build/releases/ - - save_cache: - key: gradle - paths: - - "~/.gradle" - - store_artifacts: - path: build/releases - destination: build - - run: scripts/upload-to-builds.jabref.org.sh - - buildRelease: - docker: - - image: circleci/openjdk:11.0.4-jdk-stretch - steps: - - checkout - - restore_cache: - key: install4j-{{ checksum "scripts/prepare-install4j.sh" }} - - run: scripts/prepare-install4j.sh - - run: install4j8/bin/install4jc --verbose --license=$INSTALL4J8_KEY - - restore_cache: - key: gradle - - run: git submodule sync - - run: git submodule update --init - - run: ./gradlew -Pinstall4jDir="install4j8" release --stacktrace - - store_artifacts: - path: build/releases - destination: release - - run: scripts/upload-to-builds.jabref.org.sh - filters: - tags: - only: /.*/ - -workflows: - version: 2 - build: - jobs: - - prepareinstall4j - - buildDev: - requires: - - prepareinstall4j - - buildRelease: - requires: - - prepareinstall4j - filters: - branches: - ignore: /.*/ - tags: - only: /.*/ From 1723c584555e019ad0d965b3510b5db8cd9ddb76 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 12 Sep 2019 21:18:12 +0200 Subject: [PATCH 07/56] Update gradle.yml --- .github/workflows/gradle.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5d98581f836..be685cee911 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -25,13 +25,22 @@ jobs: uses: actions/setup-java@v1 with: java-version: 11.0.4 - - name: Build with Gradle + - name: Download and extract JDK 14 + run: ? + - name: Build runtime image run: ./gradlew jlinkZip - - name: Save artifact + - name: Add runtime image as artifact uses: actions/upload-artifact@master with: - name: JabRef-${{ matrix.displayName }} + name: JabRef-${{ matrix.displayName }}-raw path: build/image + - name: Build installer + run: ./gradlew jpackage + - name: Add installer as artifact + uses: actions/upload-artifact@master + with: + name: JabRef-${{ matrix.displayName }} + path: build/jpackage - name: Upload to build.jabref.org uses: garygrossgarten/github-action-scp@release with: From ff8e3fb194b2286b8a2e8b564cad376dc603996b Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Thu, 12 Sep 2019 23:03:54 +0200 Subject: [PATCH 08/56] Set Java to 13.0.3 --- .github/workflows/gradle.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index be685cee911..cdda5748d25 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -24,9 +24,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 11.0.4 - - name: Download and extract JDK 14 - run: ? + java-version: 13.0.3 - name: Build runtime image run: ./gradlew jlinkZip - name: Add runtime image as artifact @@ -50,5 +48,3 @@ jobs: username: builds_jabref_org privateKey: ${{ secrets.buildJabRefPrivateKey }} port: 9922 -} - From 1f934208c596bf18bf4650767a123c5e60cb5a07 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Thu, 12 Sep 2019 23:09:27 +0200 Subject: [PATCH 09/56] Try to really set Java to 13 --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index cdda5748d25..2384e2b1777 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -24,7 +24,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 13.0.3 + java-version: 1.13 - name: Build runtime image run: ./gradlew jlinkZip - name: Add runtime image as artifact From d2eb9a7cb9b9bb15d05abb040e28fb15630544c2 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Thu, 12 Sep 2019 23:47:35 +0200 Subject: [PATCH 10/56] Does JDK 1.12 work? --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2384e2b1777..ba549e2e38c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -24,7 +24,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 1.13 + java-version: 1.12 - name: Build runtime image run: ./gradlew jlinkZip - name: Add runtime image as artifact From 5cda839dbcd82a9eb571ce22e72bb4f7136ac5e2 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 12 Sep 2019 23:59:11 +0200 Subject: [PATCH 11/56] Uncomment installer related stuff --- .github/workflows/gradle.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ba549e2e38c..4d83d54bae7 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -24,7 +24,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 1.12 + java-version: 11.0.4 - name: Build runtime image run: ./gradlew jlinkZip - name: Add runtime image as artifact @@ -32,13 +32,14 @@ jobs: with: name: JabRef-${{ matrix.displayName }}-raw path: build/image - - name: Build installer - run: ./gradlew jpackage - - name: Add installer as artifact - uses: actions/upload-artifact@master - with: - name: JabRef-${{ matrix.displayName }} - path: build/jpackage + # TODO: Needs jpackage from https://jdk.java.net/jpackage/ + #- name: Build installer + # run: ./gradlew jpackage + #- name: Add installer as artifact + # uses: actions/upload-artifact@master + # with: + # name: JabRef-${{ matrix.displayName }} + # path: build/jpackage - name: Upload to build.jabref.org uses: garygrossgarten/github-action-scp@release with: From ff43c9dc4f8e45fb7f6c59de5db1d314493f4f53 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 17:29:59 +0200 Subject: [PATCH 12/56] Use jpackage --- .github/workflows/gradle.yml | 53 +++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 4d83d54bae7..c9505c440ae 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -10,10 +10,13 @@ jobs: include: - os: ubuntu-latest displayName: linux + jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_linux-x64_bin.tar.gz - os: windows-latest displayName: windows + jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz - os: macOS-latest displayName: macOS + jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz runs-on: ${{ matrix.os }} name: Deploy on ${{ matrix.displayName }} @@ -32,20 +35,38 @@ jobs: with: name: JabRef-${{ matrix.displayName }}-raw path: build/image - # TODO: Needs jpackage from https://jdk.java.net/jpackage/ - #- name: Build installer - # run: ./gradlew jpackage - #- name: Add installer as artifact - # uses: actions/upload-artifact@master - # with: - # name: JabRef-${{ matrix.displayName }} - # path: build/jpackage - - name: Upload to build.jabref.org - uses: garygrossgarten/github-action-scp@release + - name: Download jpackage + # We need to download jpackage from https://jdk.java.net/jpackage/ + run: | + import os + import tarfile + import urllib + + url = ${{ matrix.jpackageDownload }} + + tmpfile = urllib.urlretrieve(url, filename=None)[0] + base_name = os.path.basename(url) + + file_name, file_extension = os.path.splitext(base_name) + tar = tarfile.open(tmpfile) + tar.extractall() + tar.close() + shell: python + - name: Build installer + env: + BADASS_JLINK_JPACKAGE_HOME: /jdk-14 + run: ./gradlew jpackage + - name: Add installer as artifact + uses: actions/upload-artifact@master with: - local: build/image.zip - remote: JabRef-${{ matrix.displayName }}.zip - host: build-upload.jabref.org - username: builds_jabref_org - privateKey: ${{ secrets.buildJabRefPrivateKey }} - port: 9922 + name: JabRef-${{ matrix.displayName }} + path: build/jpackage + #- name: Upload to build.jabref.org + # uses: garygrossgarten/github-action-scp@release + # with: + # local: build/image.zip + # remote: JabRef-${{ matrix.displayName }}.zip + # host: build-upload.jabref.org + # username: builds_jabref_org + # privateKey: ${{ secrets.buildJabRefPrivateKey }} + # port: 9922 From 248c1e261e888c83b5b91f4e627ccd1313550ee4 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 17:37:37 +0200 Subject: [PATCH 13/56] Fix ? build --- .github/workflows/gradle.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c9505c440ae..ea13e1f5f06 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -28,13 +28,6 @@ jobs: uses: actions/setup-java@v1 with: java-version: 11.0.4 - - name: Build runtime image - run: ./gradlew jlinkZip - - name: Add runtime image as artifact - uses: actions/upload-artifact@master - with: - name: JabRef-${{ matrix.displayName }}-raw - path: build/image - name: Download jpackage # We need to download jpackage from https://jdk.java.net/jpackage/ run: | @@ -42,7 +35,7 @@ jobs: import tarfile import urllib - url = ${{ matrix.jpackageDownload }} + url = "${{ matrix.jpackageDownload }}" tmpfile = urllib.urlretrieve(url, filename=None)[0] base_name = os.path.basename(url) @@ -52,10 +45,17 @@ jobs: tar.extractall() tar.close() shell: python + - name: Build runtime image + run: ./gradlew jlinkZip - name: Build installer env: BADASS_JLINK_JPACKAGE_HOME: /jdk-14 run: ./gradlew jpackage + - name: Add runtime image as artifact + uses: actions/upload-artifact@master + with: + name: JabRef-${{ matrix.displayName }}-raw + path: build/image - name: Add installer as artifact uses: actions/upload-artifact@master with: From 254503284a02eec5b40956ee165c782bb7337989 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 17:46:11 +0200 Subject: [PATCH 14/56] We are using python 3 apparently --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ea13e1f5f06..e970334d95a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -33,11 +33,11 @@ jobs: run: | import os import tarfile - import urllib + import urllib.request url = "${{ matrix.jpackageDownload }}" - tmpfile = urllib.urlretrieve(url, filename=None)[0] + tmpfile, headers = urllib.request.urlretrieve(url) base_name = os.path.basename(url) file_name, file_extension = os.path.splitext(base_name) From 66be71b7393a75b10d20db7914ee318ade6c55e9 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 17:56:21 +0200 Subject: [PATCH 15/56] Or not... --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e970334d95a..137361f05a1 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -33,11 +33,11 @@ jobs: run: | import os import tarfile - import urllib.request + import urllib url = "${{ matrix.jpackageDownload }}" - tmpfile, headers = urllib.request.urlretrieve(url) + tmpfile, headers = urllib.urlretrieve(url) base_name = os.path.basename(url) file_name, file_extension = os.path.splitext(base_name) From 09010aba933b6fe24c96d4d8e78f71baded7c4f1 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 18:00:54 +0200 Subject: [PATCH 16/56] Ah, we are on both at the same time... --- .github/workflows/gradle.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 137361f05a1..add4d95bc3b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -33,11 +33,16 @@ jobs: run: | import os import tarfile - import urllib + import sys + + if sys.version_info[0] >= 3: + from urllib.request import urlretrieve + else: + from urllib import urlretrieve url = "${{ matrix.jpackageDownload }}" - tmpfile, headers = urllib.urlretrieve(url) + tmpfile, headers = urlretrieve(url) base_name = os.path.basename(url) file_name, file_extension = os.path.splitext(base_name) From 254cd96b52e4b5a68f8a5b353e4e2cfd9e362ad1 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 18:16:37 +0200 Subject: [PATCH 17/56] Fix path to jpackage --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index ca879487f64..1a6a48bcdf2 100644 --- a/build.gradle +++ b/build.gradle @@ -665,10 +665,10 @@ jlink { provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.ManagedChannelProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider' } - // This is experimental thing; could replace install4j jpackage { - // Download from https://jdk.java.net/jpackage/ and change path accordingly - jpackageHome = 'H:\\Downloading\\openjdk-13-jpackage+49_windows-x64_bin\\jdk-13' + // In order for this to work, you need to dowload jpackage from https://jdk.java.net/jpackage/ + // and put the path to the jdk-14 folder in the environment variable BADASS_JLINK_JPACKAGE_HOME + outputDir = "distribution" } } From 1a29693bce0fb97e453de32a6f95cdd93fc9c1ef Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 18:19:19 +0200 Subject: [PATCH 18/56] Cleanup --- .github/workflows/gradle.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index add4d95bc3b..b8b793200d3 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -31,7 +31,6 @@ jobs: - name: Download jpackage # We need to download jpackage from https://jdk.java.net/jpackage/ run: | - import os import tarfile import sys @@ -40,12 +39,7 @@ jobs: else: from urllib import urlretrieve - url = "${{ matrix.jpackageDownload }}" - - tmpfile, headers = urlretrieve(url) - base_name = os.path.basename(url) - - file_name, file_extension = os.path.splitext(base_name) + tmpfile, headers = urlretrieve("${{ matrix.jpackageDownload }}") tar = tarfile.open(tmpfile) tar.extractall() tar.close() @@ -65,7 +59,7 @@ jobs: uses: actions/upload-artifact@master with: name: JabRef-${{ matrix.displayName }} - path: build/jpackage + path: build/distribution #- name: Upload to build.jabref.org # uses: garygrossgarten/github-action-scp@release # with: From 79a02c930f70f2f8081924061c2ffc97b48de408 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 18:20:26 +0200 Subject: [PATCH 19/56] Dont stop trying... --- .github/workflows/gradle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index b8b793200d3..32dc27b0f34 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -5,6 +5,7 @@ on: [push] jobs: deploy: strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macOS-latest] include: From c2712e07c8373f51f950114d336674ce4f1cf444 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 18:39:48 +0200 Subject: [PATCH 20/56] Debug... --- .github/workflows/gradle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 32dc27b0f34..395fd325f32 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -45,6 +45,9 @@ jobs: tar.extractall() tar.close() shell: python + - name: Display content of path + run: ls + shell: bash - name: Build runtime image run: ./gradlew jlinkZip - name: Build installer From e96b14f754318a1a2656681e27e20d4a5140c922 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 19:01:22 +0200 Subject: [PATCH 21/56] try to fix path to jpackage --- .github/workflows/gradle.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 395fd325f32..c2a243dfa2a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -48,11 +48,18 @@ jobs: - name: Display content of path run: ls shell: bash + - name: Display content of path + env: + BADASS_JLINK_JPACKAGE_HOME: ${GITHUB_WORKSPACE}/jdk-14 + run: | + cd ${BADASS_JLINK_JPACKAGE_HOME} + ls + shell: bash - name: Build runtime image run: ./gradlew jlinkZip - name: Build installer env: - BADASS_JLINK_JPACKAGE_HOME: /jdk-14 + BADASS_JLINK_JPACKAGE_HOME: ${GITHUB_WORKSPACE}/jdk-14 run: ./gradlew jpackage - name: Add runtime image as artifact uses: actions/upload-artifact@master From be093c40fe0c342024d4d4b2ac0b232cc64af562 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 19:08:46 +0200 Subject: [PATCH 22/56] Add baces --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c2a243dfa2a..905f3d56ce4 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -50,7 +50,7 @@ jobs: shell: bash - name: Display content of path env: - BADASS_JLINK_JPACKAGE_HOME: ${GITHUB_WORKSPACE}/jdk-14 + BADASS_JLINK_JPACKAGE_HOME: ${{GITHUB_WORKSPACE}}/jdk-14 run: | cd ${BADASS_JLINK_JPACKAGE_HOME} ls @@ -59,7 +59,7 @@ jobs: run: ./gradlew jlinkZip - name: Build installer env: - BADASS_JLINK_JPACKAGE_HOME: ${GITHUB_WORKSPACE}/jdk-14 + BADASS_JLINK_JPACKAGE_HOME: ${{GITHUB_WORKSPACE}}/jdk-14 run: ./gradlew jpackage - name: Add runtime image as artifact uses: actions/upload-artifact@master From 12c1e342c648218b3d5ef5f6f3f3b26d6cc58a83 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 19:18:49 +0200 Subject: [PATCH 23/56] Set environment variable properly --- .github/workflows/gradle.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 905f3d56ce4..b797e596ad6 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -44,14 +44,12 @@ jobs: tar = tarfile.open(tmpfile) tar.extractall() tar.close() + + os.environ["BADASS_JLINK_JPACKAGE_HOME"] = "${{GITHUB_WORKSPACE}}/jdk-14" shell: python - name: Display content of path - run: ls - shell: bash - - name: Display content of path - env: - BADASS_JLINK_JPACKAGE_HOME: ${{GITHUB_WORKSPACE}}/jdk-14 run: | + ls cd ${BADASS_JLINK_JPACKAGE_HOME} ls shell: bash From 2cf9fcfc9d883211f1a621d8bffad33359e854ca Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 19:21:33 +0200 Subject: [PATCH 24/56] Well... --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index b797e596ad6..7f41632f5b8 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -45,7 +45,7 @@ jobs: tar.extractall() tar.close() - os.environ["BADASS_JLINK_JPACKAGE_HOME"] = "${{GITHUB_WORKSPACE}}/jdk-14" + os.environ["BADASS_JLINK_JPACKAGE_HOME"] = os.environ["GITHUB_WORKSPACE"] + "/jdk-14" shell: python - name: Display content of path run: | From 8a2b03595e7cec61619239ae1877c7f21469b0e8 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 19:22:20 +0200 Subject: [PATCH 25/56] Dudadud... --- .github/workflows/gradle.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 7f41632f5b8..45d2e992151 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -56,8 +56,6 @@ jobs: - name: Build runtime image run: ./gradlew jlinkZip - name: Build installer - env: - BADASS_JLINK_JPACKAGE_HOME: ${{GITHUB_WORKSPACE}}/jdk-14 run: ./gradlew jpackage - name: Add runtime image as artifact uses: actions/upload-artifact@master From b7d82208ab89b51da6b4da8017239029a215ccc8 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 19:27:05 +0200 Subject: [PATCH 26/56] This is fun... --- .github/workflows/gradle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 45d2e992151..8c0f434c563 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -34,6 +34,7 @@ jobs: run: | import tarfile import sys + import os if sys.version_info[0] >= 3: from urllib.request import urlretrieve From f6666387681b505979e9529c326272ad6c7419e7 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 19:50:35 +0200 Subject: [PATCH 27/56] Set enviornment variable directly --- .github/workflows/gradle.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8c0f434c563..2d15dc4ff19 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -34,7 +34,6 @@ jobs: run: | import tarfile import sys - import os if sys.version_info[0] >= 3: from urllib.request import urlretrieve @@ -45,19 +44,21 @@ jobs: tar = tarfile.open(tmpfile) tar.extractall() tar.close() - - os.environ["BADASS_JLINK_JPACKAGE_HOME"] = os.environ["GITHUB_WORKSPACE"] + "/jdk-14" shell: python - name: Display content of path run: | ls - cd ${BADASS_JLINK_JPACKAGE_HOME} + BADASS_JLINK_JPACKAGE_HOME = "$GITHUB_WORKSPACE" + "/jdk-14" + cd "$BADASS_JLINK_JPACKAGE_HOME" ls shell: bash - name: Build runtime image run: ./gradlew jlinkZip - name: Build installer - run: ./gradlew jpackage + run: | + BADASS_JLINK_JPACKAGE_HOME = "$GITHUB_WORKSPACE" + "/jdk-14" + ./gradlew jpackage + shell: bash - name: Add runtime image as artifact uses: actions/upload-artifact@master with: From cf50318650611e6e4f59dcb49ae15e1747c9745c Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 19:59:48 +0200 Subject: [PATCH 28/56] This is going to be somewhat frusting... --- .github/workflows/gradle.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2d15dc4ff19..3385e902257 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -12,12 +12,15 @@ jobs: - os: ubuntu-latest displayName: linux jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_linux-x64_bin.tar.gz + jdk14Path: /jdk-14 - os: windows-latest displayName: windows jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz + jdk14Path: /jdk-14.jdk - os: macOS-latest displayName: macOS jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz + jdk14Path: /jdk-14.jdk runs-on: ${{ matrix.os }} name: Deploy on ${{ matrix.displayName }} @@ -48,7 +51,7 @@ jobs: - name: Display content of path run: | ls - BADASS_JLINK_JPACKAGE_HOME = "$GITHUB_WORKSPACE" + "/jdk-14" + export BADASS_JLINK_JPACKAGE_HOME = "$GITHUB_WORKSPACE" + "${{ matrix.jdk14Path }}" cd "$BADASS_JLINK_JPACKAGE_HOME" ls shell: bash @@ -56,7 +59,7 @@ jobs: run: ./gradlew jlinkZip - name: Build installer run: | - BADASS_JLINK_JPACKAGE_HOME = "$GITHUB_WORKSPACE" + "/jdk-14" + export BADASS_JLINK_JPACKAGE_HOME = "$GITHUB_WORKSPACE" + "${{ matrix.jdk14Path }}" ./gradlew jpackage shell: bash - name: Add runtime image as artifact From 8dac085cd6b7a31cd353e4d74dba4e00b91074f2 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 20:04:18 +0200 Subject: [PATCH 29/56] I feel like I'm learning a lot about shell syntax today --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 3385e902257..8147b1b850a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -51,7 +51,7 @@ jobs: - name: Display content of path run: | ls - export BADASS_JLINK_JPACKAGE_HOME = "$GITHUB_WORKSPACE" + "${{ matrix.jdk14Path }}" + export BADASS_JLINK_JPACKAGE_HOME = $GITHUB_WORKSPACE ${{ matrix.jdk14Path }} cd "$BADASS_JLINK_JPACKAGE_HOME" ls shell: bash @@ -59,7 +59,7 @@ jobs: run: ./gradlew jlinkZip - name: Build installer run: | - export BADASS_JLINK_JPACKAGE_HOME = "$GITHUB_WORKSPACE" + "${{ matrix.jdk14Path }}" + export BADASS_JLINK_JPACKAGE_HOME = $GITHUB_WORKSPACE ${{ matrix.jdk14Path }} ./gradlew jpackage shell: bash - name: Add runtime image as artifact From fef9577ed2371a693e55f818f6ac5fd541450276 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 20:11:41 +0200 Subject: [PATCH 30/56] Spaces are bad? --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8147b1b850a..24afce60444 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -51,7 +51,7 @@ jobs: - name: Display content of path run: | ls - export BADASS_JLINK_JPACKAGE_HOME = $GITHUB_WORKSPACE ${{ matrix.jdk14Path }} + export BADASS_JLINK_JPACKAGE_HOME=$GITHUB_WORKSPACE "${{ matrix.jdk14Path }}" cd "$BADASS_JLINK_JPACKAGE_HOME" ls shell: bash @@ -59,7 +59,7 @@ jobs: run: ./gradlew jlinkZip - name: Build installer run: | - export BADASS_JLINK_JPACKAGE_HOME = $GITHUB_WORKSPACE ${{ matrix.jdk14Path }} + export BADASS_JLINK_JPACKAGE_HOME=$GITHUB_WORKSPACE "${{ matrix.jdk14Path }}" ./gradlew jpackage shell: bash - name: Add runtime image as artifact From d72ec83e0602315f8cb90e898a748687235356c9 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 20:18:18 +0200 Subject: [PATCH 31/56] C'mon... --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 24afce60444..ef82456a04e 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -51,7 +51,7 @@ jobs: - name: Display content of path run: | ls - export BADASS_JLINK_JPACKAGE_HOME=$GITHUB_WORKSPACE "${{ matrix.jdk14Path }}" + export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}" cd "$BADASS_JLINK_JPACKAGE_HOME" ls shell: bash @@ -59,7 +59,7 @@ jobs: run: ./gradlew jlinkZip - name: Build installer run: | - export BADASS_JLINK_JPACKAGE_HOME=$GITHUB_WORKSPACE "${{ matrix.jdk14Path }}" + export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}" ./gradlew jpackage shell: bash - name: Add runtime image as artifact From 6b1597247df60cb979266a661335d40d2fdc19d8 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 20:35:29 +0200 Subject: [PATCH 32/56] Fix paths? --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ef82456a04e..6dd2d26fa91 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -16,11 +16,11 @@ jobs: - os: windows-latest displayName: windows jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz - jdk14Path: /jdk-14.jdk + jdk14Path: /jdk-14.jdk/Contents - os: macOS-latest displayName: macOS jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz - jdk14Path: /jdk-14.jdk + jdk14Path: /jdk-14.jdk/Contents runs-on: ${{ matrix.os }} name: Deploy on ${{ matrix.displayName }} From 4f9b32b22dc509470ea1aab3c1be53fcbe032c48 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 20:41:05 +0200 Subject: [PATCH 33/56] This shoud work now... --- .github/workflows/gradle.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 6dd2d26fa91..7420a3cc261 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -15,12 +15,12 @@ jobs: jdk14Path: /jdk-14 - os: windows-latest displayName: windows - jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz - jdk14Path: /jdk-14.jdk/Contents + jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_windows-x64_bin.zip + jdk14Path: /jdk-14 - os: macOS-latest displayName: macOS jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz - jdk14Path: /jdk-14.jdk/Contents + jdk14Path: /jdk-14.jdk/Contents/Home runs-on: ${{ matrix.os }} name: Deploy on ${{ matrix.displayName }} From e128dd12a51659e675bfe80fa89ff0334a0359f9 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 21:00:44 +0200 Subject: [PATCH 34/56] Zips are not tars, thats suprising --- .github/workflows/gradle.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 7420a3cc261..33677189685 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -36,6 +36,7 @@ jobs: # We need to download jpackage from https://jdk.java.net/jpackage/ run: | import tarfile + import zipfile import sys if sys.version_info[0] >= 3: @@ -44,9 +45,14 @@ jobs: from urllib import urlretrieve tmpfile, headers = urlretrieve("${{ matrix.jpackageDownload }}") - tar = tarfile.open(tmpfile) - tar.extractall() - tar.close() + if (tmpfile.endswith("tar.gz")): + tar = tarfile.open(tmpfile) + tar.extractall() + tar.close() + elif (tmpfile.endswith("zip")): + zip = zipfile.ZipFile(tmpfile) + zip.extractall() + zip.close() shell: python - name: Display content of path run: | From b2eabda73ab310c4cfd209c2d229053c6d545530 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 21:19:55 +0200 Subject: [PATCH 35/56] Try with url --- .github/workflows/gradle.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 33677189685..64091afc9d5 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -15,7 +15,7 @@ jobs: jdk14Path: /jdk-14 - os: windows-latest displayName: windows - jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_windows-x64_bin.zip + jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_windows-x64_bin.zip jdk14Path: /jdk-14 - os: macOS-latest displayName: macOS @@ -38,18 +38,18 @@ jobs: import tarfile import zipfile import sys - if sys.version_info[0] >= 3: from urllib.request import urlretrieve else: from urllib import urlretrieve - tmpfile, headers = urlretrieve("${{ matrix.jpackageDownload }}") - if (tmpfile.endswith("tar.gz")): + url = "${{ matrix.jpackageDownload }}" + tmpfile, headers = urlretrieve(url) + if (url.endswith("tar.gz")): tar = tarfile.open(tmpfile) tar.extractall() tar.close() - elif (tmpfile.endswith("zip")): + elif (url.endswith("zip")): zip = zipfile.ZipFile(tmpfile) zip.extractall() zip.close() From bfbc3820ffe5f19cd8ee0b032f6fd769f4a2d9a5 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 22:04:32 +0200 Subject: [PATCH 36/56] Make pretty --- build.gradle | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 1a6a48bcdf2..c942bf623bc 100644 --- a/build.gradle +++ b/build.gradle @@ -522,7 +522,7 @@ shadowJar { } /* - * Changes project.version to VERSION--snapshot--DATE--GIT_HASH + * Changes project.version to VERSION--DATE--GIT_HASH */ if (hasProperty('dev')) { String command = "git log --pretty=format:%cd--%h -n 1 --date=short" @@ -551,7 +551,7 @@ if (hasProperty('dev')) { // first the date (%cd), then the branch name, and finally the commit id (%h) String infoString = commitInfo.substring(0, 10) + "--" + branchName + "--" + commitInfo.substring(12) - project.version += "--snapshot--" + infoString + project.version += "--" + infoString } install4j { @@ -615,7 +615,7 @@ task snapJar(dependsOn: "releaseJar", type: Delete) { jlink { options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'] launcher { - name = 'JabRefMain' + name = 'JabRef' } addOptions("--bind-services") @@ -669,6 +669,12 @@ jlink { // In order for this to work, you need to dowload jpackage from https://jdk.java.net/jpackage/ // and put the path to the jdk-14 folder in the environment variable BADASS_JLINK_JPACKAGE_HOME outputDir = "distribution" + installerOptions = [ + '--vendor', 'JabRef', + '--app-version', "${project.version}", + '--icon', "${projectDir}/src/main/resources/icons/jabref.icns", + '--win-dir-chooser' + ] } } From 0efb87359aa6232eda113e05ed1a2115a0cc8476 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 22:05:44 +0200 Subject: [PATCH 37/56] Remove debugging output --- .github/workflows/gradle.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 64091afc9d5..9d89d627bf7 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -54,13 +54,6 @@ jobs: zip.extractall() zip.close() shell: python - - name: Display content of path - run: | - ls - export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}" - cd "$BADASS_JLINK_JPACKAGE_HOME" - ls - shell: bash - name: Build runtime image run: ./gradlew jlinkZip - name: Build installer From ee2043e773ae11448f67496aef7f4492364029e4 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 22:06:15 +0200 Subject: [PATCH 38/56] Rename gradle.yml to depoyment.yml --- .github/workflows/{gradle.yml => depoyment.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{gradle.yml => depoyment.yml} (100%) diff --git a/.github/workflows/gradle.yml b/.github/workflows/depoyment.yml similarity index 100% rename from .github/workflows/gradle.yml rename to .github/workflows/depoyment.yml From 9df74a5008ddc02c92776180af9402ca5591099d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 22:06:36 +0200 Subject: [PATCH 39/56] Rename depoyment.yml to deployment.yml --- .github/workflows/{depoyment.yml => deployment.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{depoyment.yml => deployment.yml} (100%) diff --git a/.github/workflows/depoyment.yml b/.github/workflows/deployment.yml similarity index 100% rename from .github/workflows/depoyment.yml rename to .github/workflows/deployment.yml From 085644825ccdd03a3af831b0f48c2b02cde9a945 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 22:19:14 +0200 Subject: [PATCH 40/56] Update build.gradle --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c942bf623bc..89660c7932c 100644 --- a/build.gradle +++ b/build.gradle @@ -672,7 +672,7 @@ jlink { installerOptions = [ '--vendor', 'JabRef', '--app-version', "${project.version}", - '--icon', "${projectDir}/src/main/resources/icons/jabref.icns", + // '--icon', "${projectDir}/src/main/resources/icons/jabref.icns", '--win-dir-chooser' ] } From 4d2635db4665ee1c3115f0ad6ece66ad6bf49cc1 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 22:56:23 +0200 Subject: [PATCH 41/56] Fix build --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 89660c7932c..a20a5604da3 100644 --- a/build.gradle +++ b/build.gradle @@ -671,9 +671,9 @@ jlink { outputDir = "distribution" installerOptions = [ '--vendor', 'JabRef', - '--app-version', "${project.version}", + //'--app-version', "${project.version}", // '--icon', "${projectDir}/src/main/resources/icons/jabref.icns", - '--win-dir-chooser' + //'--win-dir-chooser' ] } } From 92e9fb4ff31305ac24cc995650108a2ed018e4cd Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 13 Sep 2019 23:29:41 +0200 Subject: [PATCH 42/56] Does uploading works now? --- .github/workflows/deployment.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 9d89d627bf7..a1e6b8f6faf 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -71,12 +71,12 @@ jobs: with: name: JabRef-${{ matrix.displayName }} path: build/distribution - #- name: Upload to build.jabref.org - # uses: garygrossgarten/github-action-scp@release - # with: - # local: build/image.zip - # remote: JabRef-${{ matrix.displayName }}.zip - # host: build-upload.jabref.org - # username: builds_jabref_org - # privateKey: ${{ secrets.buildJabRefPrivateKey }} - # port: 9922 + - name: Upload to build.jabref.org + uses: garygrossgarten/github-action-scp@release + with: + local: build/distribution + remote: scp/directory + host: build-upload.jabref.org + username: builds_jabref_org + privateKey: ${{ secrets.buildJabRefPrivateKey }} + port: 9922 From 99562d846cada34de912b8bfce1c4eab6e640c08 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 14 Sep 2019 13:21:11 +0200 Subject: [PATCH 43/56] Improve installer for windows --- build.gradle | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index a20a5604da3..3ec4e1b08b3 100644 --- a/build.gradle +++ b/build.gradle @@ -669,12 +669,20 @@ jlink { // In order for this to work, you need to dowload jpackage from https://jdk.java.net/jpackage/ // and put the path to the jdk-14 folder in the environment variable BADASS_JLINK_JPACKAGE_HOME outputDir = "distribution" - installerOptions = [ - '--vendor', 'JabRef', - //'--app-version', "${project.version}", - // '--icon', "${projectDir}/src/main/resources/icons/jabref.icns", - //'--win-dir-chooser' - ] + + if (OperatingSystem.current().isWindows()) { + // This requires WiX to be installed: /~https://github.com/wixtoolset/wix3/releases + installerType = "msi" + imageOptions = [ + '--icon', "${projectDir}/src/main/resources/icons/jabref.ico", + ] + installerOptions = [ + '--vendor', 'JabRef', + '--app-version', "${project.ext.twoDotVersion}", + '--win-dir-chooser', + '--win-shortcut' + ] + } } } From 80381b6320aeafe37506750d9663d55eb868f18e Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 14 Sep 2019 13:26:54 +0200 Subject: [PATCH 44/56] Remove install4j and shadowjar from gradle --- build.gradle | 65 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 63 deletions(-) diff --git a/build.gradle b/build.gradle index 3ec4e1b08b3..0dd23c203f1 100644 --- a/build.gradle +++ b/build.gradle @@ -21,8 +21,6 @@ buildscript { plugins { id 'application' id 'com.gradle.build-scan' version '2.4.1' - id 'com.install4j.gradle' version '8.0.1' - id 'com.github.johnrengelman.shadow' version '5.1.0' id "com.simonharrer.modernizer" version '1.8.0-1' id 'me.champeau.gradle.jmh' version '0.4.8' //id 'net.ltgt.errorprone' version '0.8.1' @@ -42,7 +40,6 @@ apply plugin: 'java' apply plugin: 'application' apply plugin: 'project-report' apply plugin: 'jacoco' -apply plugin: 'install4j' apply plugin: 'me.champeau.gradle.jmh' apply plugin: 'checkstyle' apply plugin: JabRefAntlrPlugin @@ -53,8 +50,7 @@ apply from: 'eclipse.gradle' group = "org.jabref" version = "5.0-dev" -project.ext.threeDotVersion = "5.0.0.1" -project.ext.install4jDir = hasProperty("install4jDir") ? getProperty("install4jDir") : (OperatingSystem.current().isWindows() ? 'C:/Program Files/install4j8' : 'install4j8') +project.ext.twoDotVersion = "5.0.1" sourceCompatibility = 11 targetCompatibility = 11 mainClassName = "$moduleName/org.jabref.JabRefLauncher" @@ -67,7 +63,6 @@ patchModules.config = [ "test3=sourcecode_2.12-0.1.4.jar" ] - // These are the Java version requirements we will check on each start of JabRef ext.minRequiredJavaVersion = "1.8.0_171" ext.allowJava9 = true @@ -515,12 +510,6 @@ modernizer { } // Release tasks -shadowJar { - transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer) - classifier 'fat' - zip64 true -} - /* * Changes project.version to VERSION--DATE--GIT_HASH */ @@ -554,10 +543,6 @@ if (hasProperty('dev')) { project.version += "--" + infoString } -install4j { - installDir = file(project.ext.install4jDir) -} - task generateFinalJabRefPS1File(type: Copy) { from('buildres') { include 'JabRef.ps1' @@ -566,52 +551,6 @@ task generateFinalJabRefPS1File(type: Copy) { filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [jabRefJarFileName: jar.archiveName]) } -// has to be defined AFTER 'dev' things to have the correct project.version -task media(type: com.install4j.gradle.Install4jTask, dependsOn: ["releaseJar", "generateFinalJabRefPS1File"]) { - projectFile = file('jabref.install4j') - release = project.version - winKeystorePassword = System.getenv('CERTIFICATE_PW') - macKeystorePassword = System.getenv('CERTIFICATE_PW') - variables = [ - versionFourDots: project.ext.threeDotVersion, - buildFileName : jar.archiveName, - version : project.version - ] - - doLast { - copy { - from "build/install4j" - into "build/releases" - } - } -} - - -task release(dependsOn: ["media", "releaseJar"]) { - group = 'JabRef - Release' - description 'Creates a release for all target platforms.' -} - -task releaseJar(dependsOn: "shadowJar") { - group = 'JabRef - Release' - description "Creates a Jar release." - doLast { - copy { - from("$buildDir/libs/JabRef-${project.version}-fat.jar") - into("$buildDir/releases") - rename { String fileName -> - fileName.replace('-fat', '') - } - } - // set executable with read permissions (first true) and for all (false) - file("$buildDir/releases/JabRef-${project.version}.jar").setExecutable(true, false) - } -} - -task snapJar(dependsOn: "releaseJar", type: Delete) { - delete fileTree(dir: "$buildDir/releases/", exclude: "JabRef-${project.version}.jar") -} - jlink { options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'] launcher { @@ -667,7 +606,7 @@ jlink { jpackage { // In order for this to work, you need to dowload jpackage from https://jdk.java.net/jpackage/ - // and put the path to the jdk-14 folder in the environment variable BADASS_JLINK_JPACKAGE_HOME + // and put the path to the jdk-14 folder in the environment variable BADASS_JLINK_JPACKAGE_HOME outputDir = "distribution" if (OperatingSystem.current().isWindows()) { From a316fd9ff4ea50261f349428afb2b7944991c42e Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Thu, 19 Sep 2019 07:08:10 +0200 Subject: [PATCH 45/56] Change hostname from build-upload to build --- .github/workflows/deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index a1e6b8f6faf..9bba1998778 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -76,7 +76,7 @@ jobs: with: local: build/distribution remote: scp/directory - host: build-upload.jabref.org + host: builds.jabref.org username: builds_jabref_org privateKey: ${{ secrets.buildJabRefPrivateKey }} port: 9922 From b800c8ae6b932189afca67e6d1c0d491e392a594 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sun, 22 Sep 2019 03:32:35 +0200 Subject: [PATCH 46/56] Does scp work? --- .github/workflows/deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 9bba1998778..e6b880ea67e 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -71,11 +71,11 @@ jobs: with: name: JabRef-${{ matrix.displayName }} path: build/distribution - - name: Upload to build.jabref.org + - name: Upload to builds.jabref.org uses: garygrossgarten/github-action-scp@release with: local: build/distribution - remote: scp/directory + remote: www host: builds.jabref.org username: builds_jabref_org privateKey: ${{ secrets.buildJabRefPrivateKey }} From 317f0c6c1b47230d91028b0224fe34ecc37cac32 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 23 Sep 2019 10:14:24 +0200 Subject: [PATCH 47/56] Deploy to branch folder --- .github/workflows/deployment.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index e6b880ea67e..f9d5cf214a9 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -61,21 +61,20 @@ jobs: export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}" ./gradlew jpackage shell: bash - - name: Add runtime image as artifact - uses: actions/upload-artifact@master - with: - name: JabRef-${{ matrix.displayName }}-raw - path: build/image - name: Add installer as artifact uses: actions/upload-artifact@master with: name: JabRef-${{ matrix.displayName }} path: build/distribution + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch - name: Upload to builds.jabref.org uses: garygrossgarten/github-action-scp@release with: local: build/distribution - remote: www + remote: www/${{ steps.extract_branch.outputs.branch }} host: builds.jabref.org username: builds_jabref_org privateKey: ${{ secrets.buildJabRefPrivateKey }} From 7b4a54f2c142c1eb7cf9b385295d9e40cc2c9bc2 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 23 Sep 2019 18:05:27 +0200 Subject: [PATCH 48/56] Archive portable version before upload --- .github/workflows/deployment.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index f9d5cf214a9..1a511f09978 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -13,14 +13,17 @@ jobs: displayName: linux jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_linux-x64_bin.tar.gz jdk14Path: /jdk-14 + archivePortable: tar -czf JabRef-portable_linux.tar.gz build/distribution/JabRef && rm -R build/distribution/JabRef - os: windows-latest displayName: windows jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_windows-x64_bin.zip jdk14Path: /jdk-14 + archivePortable: 7z a -r JabRef-portable_windows.zip build/distribution/JabRef/ && rm -R build/distribution/JabRef - os: macOS-latest displayName: macOS jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz jdk14Path: /jdk-14.jdk/Contents/Home + archivePortable: tar -czf JabRef-portable_macos.tar.gz build/distribution/JabRef.app && rm -R build/distribution/JabRef.app runs-on: ${{ matrix.os }} name: Deploy on ${{ matrix.displayName }} @@ -66,6 +69,9 @@ jobs: with: name: JabRef-${{ matrix.displayName }} path: build/distribution + - name: Package application image + run: ${{ matrix.archivePortable }} + shell: bash - name: Extract branch name shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" From 00255c82d9ad85913de1a53f5e41d869ba5363e6 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 23 Sep 2019 18:22:01 +0200 Subject: [PATCH 49/56] Put in distribution folder --- .github/workflows/deployment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 1a511f09978..747f49a3bbf 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -13,17 +13,17 @@ jobs: displayName: linux jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_linux-x64_bin.tar.gz jdk14Path: /jdk-14 - archivePortable: tar -czf JabRef-portable_linux.tar.gz build/distribution/JabRef && rm -R build/distribution/JabRef + archivePortable: tar -czf build/distribution/JabRef-portable_linux.tar.gz build/distribution/JabRef && rm -R build/distribution/JabRef - os: windows-latest displayName: windows jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_windows-x64_bin.zip jdk14Path: /jdk-14 - archivePortable: 7z a -r JabRef-portable_windows.zip build/distribution/JabRef/ && rm -R build/distribution/JabRef + archivePortable: 7z a -r build/distribution/JabRef-portable_windows.zip build/distribution/JabRef/ && rm -R build/distribution/JabRef - os: macOS-latest displayName: macOS jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz jdk14Path: /jdk-14.jdk/Contents/Home - archivePortable: tar -czf JabRef-portable_macos.tar.gz build/distribution/JabRef.app && rm -R build/distribution/JabRef.app + archivePortable: tar -czf build/distribution/JabRef-portable_macos.tar.gz build/distribution/JabRef.app && rm -R build/distribution/JabRef.app runs-on: ${{ matrix.os }} name: Deploy on ${{ matrix.displayName }} From ae133264142d3fdf43ea47e6bb0b4c8fb9857cb8 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 23 Sep 2019 18:25:53 +0200 Subject: [PATCH 50/56] Beautify on linux and mac --- build.gradle | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build.gradle b/build.gradle index 0dd23c203f1..3efc1f4947a 100644 --- a/build.gradle +++ b/build.gradle @@ -622,6 +622,26 @@ jlink { '--win-shortcut' ] } + + if (OperatingSystem.current().isLinux()) { + imageOptions = [ + '--icon', "${projectDir}/src/main/resources/icons/jabref.ico", + ] + installerOptions = [ + '--vendor', 'JabRef', + '--app-version', "${project.ext.version}" + ] + } + + if (OperatingSystem.current().isMacOsX()) { + imageOptions = [ + '--icon', "${projectDir}/src/main/resources/icons/jabref.ico", + ] + installerOptions = [ + '--vendor', 'JabRef', + '--app-version', "${project.ext.version}" + ] + } } } From b7ab437a2b17dab59d234455dd1d06b13780c9f4 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 23 Sep 2019 20:36:16 +0200 Subject: [PATCH 51/56] Update build.gradle --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 3efc1f4947a..0f67d28665c 100644 --- a/build.gradle +++ b/build.gradle @@ -50,7 +50,7 @@ apply from: 'eclipse.gradle' group = "org.jabref" version = "5.0-dev" -project.ext.twoDotVersion = "5.0.1" +project.ext.twoDotVersion = "5.0.0" sourceCompatibility = 11 targetCompatibility = 11 mainClassName = "$moduleName/org.jabref.JabRefLauncher" @@ -629,7 +629,7 @@ jlink { ] installerOptions = [ '--vendor', 'JabRef', - '--app-version', "${project.ext.version}" + '--app-version', "${project.version}" ] } @@ -639,7 +639,7 @@ jlink { ] installerOptions = [ '--vendor', 'JabRef', - '--app-version', "${project.ext.version}" + '--app-version', "${project.version}" ] } } From af34309e5268a842f196c8bbcc6c8cb822395421 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 23 Sep 2019 21:44:58 +0200 Subject: [PATCH 52/56] Update build.gradle --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 0f67d28665c..04b4a1c926c 100644 --- a/build.gradle +++ b/build.gradle @@ -625,17 +625,17 @@ jlink { if (OperatingSystem.current().isLinux()) { imageOptions = [ - '--icon', "${projectDir}/src/main/resources/icons/jabref.ico", + '--icon', "${projectDir}/src/main/resources/icons/JabRef-icon-64.png", ] installerOptions = [ '--vendor', 'JabRef', - '--app-version', "${project.version}" + '--app-version', "${project.ext.twoDotVersion}" ] } if (OperatingSystem.current().isMacOsX()) { imageOptions = [ - '--icon', "${projectDir}/src/main/resources/icons/jabref.ico", + '--icon', "${projectDir}/src/main/resources/icons/jabref.icns", ] installerOptions = [ '--vendor', 'JabRef', From 8ded659f37978e9d5f3ab1204ea8558a6363d4b9 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Wed, 25 Sep 2019 11:17:43 +0200 Subject: [PATCH 53/56] Fix folder structure in archive --- .github/workflows/deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 747f49a3bbf..e4a1719fe98 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -13,7 +13,7 @@ jobs: displayName: linux jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_linux-x64_bin.tar.gz jdk14Path: /jdk-14 - archivePortable: tar -czf build/distribution/JabRef-portable_linux.tar.gz build/distribution/JabRef && rm -R build/distribution/JabRef + archivePortable: tar -czf build/distribution/JabRef-portable_linux.tar.gz -C build/distribution JabRef && rm -R build/distribution/JabRef - os: windows-latest displayName: windows jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_windows-x64_bin.zip @@ -23,7 +23,7 @@ jobs: displayName: macOS jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz jdk14Path: /jdk-14.jdk/Contents/Home - archivePortable: tar -czf build/distribution/JabRef-portable_macos.tar.gz build/distribution/JabRef.app && rm -R build/distribution/JabRef.app + archivePortable: tar -czf build/distribution/JabRef-portable_macos.tar.gz -C build/distribution JabRef.app && rm -R build/distribution/JabRef.app runs-on: ${{ matrix.os }} name: Deploy on ${{ matrix.displayName }} From 31382b69cd07bfb02c06d9cbd80602a617a51856 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 26 Sep 2019 20:58:19 +0200 Subject: [PATCH 54/56] Try to fix dev version string in about dialog --- build.gradle | 78 +++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/build.gradle b/build.gradle index 05d6527f2c3..cb0b3ff374d 100644 --- a/build.gradle +++ b/build.gradle @@ -47,8 +47,7 @@ apply plugin: LocalizationPlugin apply from: 'eclipse.gradle' group = "org.jabref" -version = "5.0-dev" -project.ext.twoDotVersion = "5.0.0" +version = "5.0.0" sourceCompatibility = 11 targetCompatibility = 11 mainClassName = "$moduleName/org.jabref.JabRefLauncher" @@ -278,7 +277,7 @@ processResources { filteringCharset = 'UTF-8' filesMatching("build.properties") { - expand(version: project.version, + expand(version: createVersionString(), "year": String.valueOf(Calendar.getInstance().get(Calendar.YEAR)), "authors": new File('AUTHORS').readLines().findAll { !it.startsWith("#") }.join(", "), "developers": new File('DEVELOPERS').readLines().findAll { !it.startsWith("#") }.join(", "), @@ -508,39 +507,6 @@ modernizer { } // Release tasks -/* - * Changes project.version to VERSION--DATE--GIT_HASH - */ -if (hasProperty('dev')) { - String command = "git log --pretty=format:%cd--%h -n 1 --date=short" - String commitInfo = "" - if (OperatingSystem.current().isWindows()) { - commitInfo = "cmd /c $command".execute().in.text - } else { - commitInfo = command.execute().in.text - } - - // determine branch - command = "git symbolic-ref -q --short HEAD" - String branchName = "" - if (OperatingSystem.current().isWindows()) { - branchName = "cmd /c $command".execute().in.text - } else { - branchName = command.execute().in.text - } - // A newline is returned. Remove it. (trim()) - // In the context of github, the branch name could be something like "pull/277" - // "/" is an illegal character. To be safe, all illegal filename characters are replaced by "_" - // http://stackoverflow.com/a/15075907/873282 describes the used pattern. - branchName = branchName.trim().replaceAll("[^a-zA-Z0-9.-]", "_") - - // hack string - // first the date (%cd), then the branch name, and finally the commit id (%h) - String infoString = commitInfo.substring(0, 10) + "--" + branchName + "--" + commitInfo.substring(12) - - project.version += "--" + infoString -} - task generateFinalJabRefPS1File(type: Copy) { from('buildres') { include 'JabRef.ps1' @@ -615,22 +581,22 @@ jlink { ] installerOptions = [ '--vendor', 'JabRef', - '--app-version', "${project.ext.twoDotVersion}", + '--app-version', "${project.version}", '--win-dir-chooser', '--win-shortcut' ] } - + if (OperatingSystem.current().isLinux()) { imageOptions = [ '--icon', "${projectDir}/src/main/resources/icons/JabRef-icon-64.png", ] installerOptions = [ '--vendor', 'JabRef', - '--app-version', "${project.ext.twoDotVersion}" + '--app-version', "${project.version}" ] } - + if (OperatingSystem.current().isMacOsX()) { imageOptions = [ '--icon', "${projectDir}/src/main/resources/icons/jabref.icns", @@ -675,3 +641,35 @@ task bundleLibreOffice(type: Jar) { destinationDir = file('lib') archiveName = 'libreoffice.jar' } + +// Returns the value of project.version in production and a string of the format VERSION-dev--DATE--BRANCH--GIT_HASH for development versions +def createVersionString() { + if (hasProperty('dev')) { + String command = "git log --pretty=format:%cd--%h -n 1 --date=short" + String commitInfo + if (OperatingSystem.current().isWindows()) { + commitInfo = "cmd /c $command".execute().in.text + } else { + commitInfo = command.execute().in.text + } + + // determine branch + command = "git symbolic-ref -q --short HEAD" + String branchName + if (OperatingSystem.current().isWindows()) { + branchName = "cmd /c $command".execute().in.text + } else { + branchName = command.execute().in.text + } + // A newline is returned. Remove it. (trim()) + // In the context of github, the branch name could be something like "pull/277" + // "/" is an illegal character. To be safe, all illegal filename characters are replaced by "_" + // http://stackoverflow.com/a/15075907/873282 describes the used pattern. + branchName = branchName.trim().replaceAll("[^a-zA-Z0-9.-]", "_") + + // first the date (%cd), then the branch name, and finally the commit id (%h) + return project.version + "-dev--" + commitInfo.substring(0, 10) + "--" + branchName + "--" + commitInfo.substring(12) + } else { + return project.version + } +} From 621df855d1b8d9820fbe47bee214ca7de854e847 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 26 Sep 2019 21:13:29 +0200 Subject: [PATCH 55/56] Remove oss.soatype.org since this is constantly failing lately --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index cb0b3ff374d..2af73c6f657 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,6 @@ buildscript { repositories { mavenLocal() jcenter() - maven { url 'https://oss.sonatype.org/content/groups/public' } } } From b7412c90e50ebd0928f7cfe8f035d4e917dcd550 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 26 Sep 2019 21:23:13 +0200 Subject: [PATCH 56/56] Add dev switch --- .github/workflows/deployment.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index e4a1719fe98..d641cf9fee0 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -24,7 +24,7 @@ jobs: jpackageDownload: https://download.java.net/java/early_access/jpackage/1/openjdk-14-jpackage+1-35_osx-x64_bin.tar.gz jdk14Path: /jdk-14.jdk/Contents/Home archivePortable: tar -czf build/distribution/JabRef-portable_macos.tar.gz -C build/distribution JabRef.app && rm -R build/distribution/JabRef.app - + runs-on: ${{ matrix.os }} name: Deploy on ${{ matrix.displayName }} @@ -55,14 +55,14 @@ jobs: elif (url.endswith("zip")): zip = zipfile.ZipFile(tmpfile) zip.extractall() - zip.close() + zip.close() shell: python - name: Build runtime image - run: ./gradlew jlinkZip + run: ./gradlew -Pdev=true jlinkZip - name: Build installer run: | export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}" - ./gradlew jpackage + ./gradlew -Pdev=true jpackage shell: bash - name: Add installer as artifact uses: actions/upload-artifact@master