Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master:
  Move snap publishing to own workflow
  Squashed 'src/main/resources/csl-locales/' changes from 2b94bf9fac..d0ee4d13c9
  Remove obsolete step
  Add debug output for snap file location
  Try to build snapcraft image also on master-release
  Build snap only for master branch
  Update GitVersion action from v0.3 to v0.9.1 (#6061)
  Add empty line to deployment.yml to trigger build
  Release v5.0
  Refine external-libraries.txt
  Revert "Remove ci prefix for releases"
  Remove suffix "-ci.1" from version information stored in BuildInfo
  Remove ci prefix for releases
  Use github action to publish snap
  • Loading branch information
Siedlerchr committed Mar 5, 2020
2 parents cb699a4 + d8ef173 commit 439172b
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 89 deletions.
60 changes: 13 additions & 47 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,16 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v2-beta
with:
fetch-depth: 0
- name: Fetch tags and master for GitVersion
run: |
git fetch --tags origin
git rev-parse --verify master
if (-not $?) {
git branch --force --create-reflog master origin/master
}
shell: pwsh
uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Install GitVersion
uses: gittools/actions/setup-gitversion@v0.3
uses: gittools/actions/gitversion/setup@v0.9.1
with:
versionSpec: '5.1.2'
versionSpec: '5.1.3'
- name: Run GitVersion
id: gitversion
uses: gittools/actions/execute-gitversion@v0.3
uses: gittools/actions/gitversion/execute@v0.9.1
- name: Set up JDK
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -111,25 +103,6 @@ jobs:
export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}"
./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jpackage
shell: bash
- name: Package application image
run: ${{ matrix.archivePortable }}
shell: bash
- name: Build snap (1) Setup snapcraft
uses: jhenstridge/snapcraft-build-action@v1
id: snapcraft
if: matrix.displayName == 'linux'
- name: Build snap (2) Run build
run: |
mv ${{ steps.snapcraft.outputs.snap }} build/distribution/
if: matrix.displayName == 'linux'
- name: Build snap (3) Upload snap
if: matrix.displayName == 'linux' && github.ref == 'refs/heads/master'
env:
SNAPCRAFT_LOGIN_FILE: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
run: |
mkdir .snapcraft && echo ${SNAPCRAFT_LOGIN_FILE} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg
snapcraft push build/distribution/jabref*.snap --release edge || true
shell: bash
- name: Rename files
run: |
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "${{ steps.gitversion.outputs.AssemblySemVer }}","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}"}
Expand All @@ -146,24 +119,16 @@ jobs:
needs: [build]
steps:
- name: Checkout source
uses: actions/checkout@v2-beta
with:
fetch-depth: 0
- name: Fetch tags and master for GitVersion
run: |
git fetch --tags origin
git rev-parse --verify master
if (-not $?) {
git branch --force --create-reflog master origin/master
}
shell: pwsh
uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Install GitVersion
uses: gittools/actions/setup-gitversion@v0.3
uses: gittools/actions/gitversion/setup@v0.9.1
with:
versionSpec: '5.1.2'
versionSpec: '5.1.3'
- name: Run GitVersion
id: gitversion
uses: gittools/actions/execute-gitversion@v0.3
uses: gittools/actions/gitversion/execute@v0.9.1
- name: Get linux binaries
uses: actions/download-artifact@master
with:
Expand Down Expand Up @@ -191,3 +156,4 @@ jobs:
ssh_options: '-p 9922'
src: 'build/distribution/'
dest: [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/

26 changes: 26 additions & 0 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Snap

on:
schedule:
# run on each day
- cron: '33 4 * * *'

jobs:
build:
runs-on: ubuntu-latest
name: Create snapcraft image

steps:
- name: Checkout source
uses: actions/checkout@v2
# The image relies on https://builds.jabref.org/master/JabRef-5.0-portable_linux.tar.gz^
# See snap/snapcraft.yml for details
- name: Build snap (1) Run build
uses: jhenstridge/snapcraft-build-action@v1
id: snapcraft
- name: Build snap (2) Upload snap
uses: jhenstridge/snapcraft-publish-action@v1
with:
store_login: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
snap: ${{ steps.snapcraft.outputs.snap }}
release: edge
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Here, the categories "Changed" for added and changed functionality,

We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#NUM`.

## [Unreleased]
## [5.0] – 2020-03-03

### Changed

Expand Down Expand Up @@ -284,7 +284,8 @@ The changelog of JabRef 4.x is available at the [v4.x branch](https://github.com
The changelog of JabRef 3.x is available at the [v3.8.2 tag](https://github.com/JabRef/jabref/blob/v3.8.2/CHANGELOG.md).
The changelog of JabRef 2.11 and all previous versions is available as [text file in the v2.11.1 tag](https://github.com/JabRef/jabref/blob/v2.11.1/CHANGELOG).

[Unreleased]: https://github.com/JabRef/jabref/compare/v5.0-beta...HEAD
[Unreleased]: https://github.com/JabRef/jabref/compare/v5.0...HEAD
[5.0]: https://github.com/JabRef/jabref/compare/v5.0-beta...v5.0
[5.0-beta]: https://github.com/JabRef/jabref/compare/v5.0-alpha...v5.0-beta
[5.0-alpha]: https://github.com/JabRef/jabref/compare/v4.3...v5.0-alpha

Expand Down
4 changes: 2 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ mode: ContinuousDeployment
branches:
master:
regex: ^master
tag: beta
pre-release-weight: 30000 # 0 after stable release, 15000 before alpha release, 30000 before beta release, 50000 before stable release
tag: ''
pre-release-weight: 50000 # 0 after stable release, 15000 before alpha release, 30000 before beta release, 50000 before stable release
145 changes: 111 additions & 34 deletions external-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This file is manually kept in sync with build.gradle and the binary jars contain

One can list all dependencies by using Gradle task `dependencyReport`.
It generates the file [build/reports/project/dependencies.txt](build/reports/project/dependencies.txt).
There, [one can use](https://stackoverflow.com/a/49727249/873282) `sed 's/^.* //' | sort | uniq` to flatten the dependencies.

## Legend

Expand Down Expand Up @@ -38,30 +39,31 @@ Note: It is important to include v1.5.54 or later as v1.5.54 is the first ver

(Sorted alphabetically by Id)

Id: com.airhacks:afterburner.fx
Project: afterburner.fx
URL: https://github.com/AdamBien/afterburner.fx
License: Apache-2.0

Id: com.apple:AppleJavaExtensions
Project: AppleJavaExtensions
URL: https://developer.apple.com/legacy/library/samplecode/AppleJavaExtensions/Introduction/Intro.html
License: Apple License

Id: com.github.tomtung
Project: latex2unicode
URL: https://github.com/tomtung/latex2unicode
License: Apache-2.0

Id: com.google.code.gson:gson
Project: Google Guava
URL: https://github.com/google/gson
License: Apache-2.0

Id: com.google.guava:failureaccess
Project: Google Guava
URL: https://github.com/google/guava
License: Apache-2.0
Note: See https://github.com/google/guava/issues/3437 for a discussion that this dependency is really required.

Id: com.google.guava:guava
Project: Google Guava
URL: https://github.com/google/guava
License: Apache-2.0

Id: com.impossibl.pgjdbc-ng:pgjdbc-ng
Project: pgjdbc-ng
URL: http://impossibl.github.io/pgjdbc-ng
License: BSD-3-Clause
Id: com.google.j2objc:j2objc-annotations
Project: j2objc-annotations
URL: https://github.com/google/j2objc
License: Apache-2.0

Id: com.konghq.unirest
Project: Unirest for Java
Expand All @@ -83,11 +85,6 @@ Project: Oracle's JDBC drivers
URL: https://repo1.maven.org/maven2/com/oracle/ojdbc/ojdbc10/19.3.0.0/ojdbc10-19.3.0.0.pom
License: Oracle Free Use Terms and Conditions (FUTC)

Id: com.sibvisions.external.jvxfx:DnDTabPane
Project: Drag'n'Drop TabPane
URL: https://github.com/sibvisions/javafx.DndTabPane
License: EPL-1.0

Id: commons-cli:commons-cli
Project: Apache Commons CLI
URL: http://commons.apache.org/cli/
Expand All @@ -98,11 +95,6 @@ Project: Apache Commons Logging
URL: http://commons.apache.org/logging/
License: Apache-2.0

Id: de.codecentric.centerdevice
Project: javafxsvg
URL: https://github.com/codecentric/javafxsvg
License: BSD 3-Clause

Id: de.jensd:fontawesomefx-materialdesignfont
Project: FontAwesomeFX
URL: https://bitbucket.org/Jerady/fontawesomefx
Expand Down Expand Up @@ -208,7 +200,7 @@ Project: ControlsFX
URL: http://fxexperience.com/controlsfx/
License: BSD-3-Clause

Id: org.fx.misc.easybind:easybind
Id: org.fxmisc.easybind:easybind
Project: EasyBind
URL: https://github.com/TomasMikula/EasyBind
License: BSD-2-Clause
Expand Down Expand Up @@ -288,12 +280,97 @@ Project: OpenOffice.org
URL: http://www.openoffice.org/api/SDK
License: Apache-2.0

Id: org.xmlunit:xmlunit-core
Project: XMLUnit
URL: http://www.xmlunit.org/
License: Apache-2.0

Id: org.xmlunit:xmlunit-matchers
Project: XMLUnit
URL: http://www.xmlunit.org/
License: Apache-2.0
## Sorted list of runtime dependencies output by gradle

```text
com.github.tomtung:latex2unicode_2.12:0.2.6
com.google.code.gson:gson:2.8.6
com.google.errorprone:error_prone_annotations:2.3.4
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:28.2-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.j2objc:j2objc-annotations:1.3
com.ibm.icu:icu4j:62.1
com.jfoenix:jfoenix:9.0.9
com.konghq:unirest-java:3.6.00
com.microsoft.azure:applicationinsights-core:2.4.1
com.microsoft.azure:applicationinsights-logging-log4j2:2.4.1
com.oracle.ojdbc:ojdbc10:19.3.0.0
com.oracle.ojdbc:ons:19.3.0.0
com.oracle.ojdbc:osdt_cert:19.3.0.0
com.oracle.ojdbc:osdt_core:19.3.0.0
com.oracle.ojdbc:simplefan:19.3.0.0
com.oracle.ojdbc:ucp:19.3.0.0
com.sun.istack:istack-commons-runtime:3.0.8
com.sun.xml.fastinfoset:FastInfoset:1.2.16
commons-cli:commons-cli:1.4
commons-codec:commons-codec:1.11
commons-logging:commons-logging:1.2
de.jensd:fontawesomefx-commons:11.0
de.jensd:fontawesomefx-materialdesignfont:1.7.22-11
de.saxsys:mvvmfx-validation:1.9.0-SNAPSHOT
de.saxsys:mvvmfx:1.8.0
de.undercouch:citeproc-java:2.1.0-SNAPSHOT
eu.lestard:doc-annotations:0.2
info.debatty:java-string-similarity:1.2.1
io.github.java-diff-utils:java-diff-utils:4.5
jakarta.activation:jakarta.activation-api:1.2.1
jakarta.annotation:jakarta.annotation-api:1.3.5
jakarta.xml.bind:jakarta.xml.bind-api:2.3.2
net.jcip:jcip-annotations:1.0
net.jodah:typetools:0.6.1
org.antlr:antlr-runtime:3.5.2
org.antlr:antlr4-runtime:4.8-1
org.apache.commons:commons-csv:1.8
org.apache.commons:commons-lang3:3.9
org.apache.commons:commons-text:1.8
org.apache.httpcomponents:httpasyncclient:4.1.4
org.apache.httpcomponents:httpclient:4.5.11
org.apache.httpcomponents:httpcore-nio:4.4.13
org.apache.httpcomponents:httpcore:4.4.13
org.apache.httpcomponents:httpmime:4.5.11
org.apache.logging.log4j:log4j-api:3.0.0-SNAPSHOT
org.apache.logging.log4j:log4j-core:3.0.0-SNAPSHOT
org.apache.logging.log4j:log4j-jcl:3.0.0-SNAPSHOT
org.apache.logging.log4j:log4j-plugins:3.0.0-SNAPSHOT
org.apache.logging.log4j:log4j-slf4j18-impl:3.0.0-SNAPSHOT
org.apache.pdfbox:fontbox:2.0.18
org.apache.pdfbox:pdfbox:2.0.18
org.apache.pdfbox:xmpbox:2.0.18
org.apache.tika:tika-core:1.23
org.bouncycastle:bcprov-jdk15on:1.64
org.checkerframework:checker-qual:2.10.0
org.controlsfx:controlsfx:11.0.1
org.fxmisc.easybind:easybind:1.0.3
org.fxmisc.flowless:flowless:0.6.1
org.fxmisc.richtext:richtextfx:0.10.4
org.fxmisc.undo:undofx:2.1.0
org.fxmisc.wellbehaved:wellbehavedfx:0.3.3
org.glassfish.hk2.external:jakarta.inject:2.6.1
org.glassfish.jaxb:jaxb-runtime:2.3.2
org.glassfish.jaxb:txw2:2.3.2
org.graalvm.js:js:19.2.1
org.graalvm.regex:regex:19.2.1
org.graalvm.sdk:graal-sdk:19.2.1
org.graalvm.truffle:truffle-api:19.2.1
org.jbibtex:jbibtex:1.0.17
org.jsoup:jsoup:1.13.1
org.jvnet.staxex:stax-ex:1.8.1
org.mariadb.jdbc:mariadb-java-client:2.5.4
org.openjfx:javafx-base:13.0.2
org.openjfx:javafx-controls:13.0.2
org.openjfx:javafx-fxml:13.0.2
org.openjfx:javafx-graphics:13.0.2
org.openjfx:javafx-media:13.0.2
org.openjfx:javafx-swing:13.0.2
org.openjfx:javafx-web:13.0.2
org.ow2.asm:asm-analysis:6.2.1
org.ow2.asm:asm-commons:6.2.1
org.ow2.asm:asm-tree:6.2.1
org.ow2.asm:asm-util:6.2.1
org.ow2.asm:asm:6.2.1
org.postgresql:postgresql:42.2.10
org.reactfx:reactfx:2.0-M5
org.scala-lang:scala-library:2.12.8
org.slf4j:slf4j-api:2.0.0-alpha1
```
9 changes: 7 additions & 2 deletions src/main/java/org/jabref/logic/util/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ public class Version {
private static final Version UNKNOWN_VERSION = new Version();

private final static Pattern VERSION_PATTERN = Pattern.compile("(?<major>\\d+)(\\.(?<minor>\\d+))?(\\.(?<patch>\\d+))?(?<stage>-alpha|-beta)?(?<dev>-?dev)?.*");
private static final String JABREF_GITHUB_RELEASES = "https://api.github.com/repos/JabRef/JabRef/releases";
private final static Pattern CI_SUFFIX_PATTERN = Pattern.compile("-ci\\.\\d+$");

private static final String JABREF_GITHUB_RELEASES = "https://api.github.com/repos/JabRef/JabRef/releases";

private String fullVersion = BuildInfo.UNKNOWN_VERSION;
private int major = -1;
Expand Down Expand Up @@ -58,6 +59,10 @@ public static Version parse(String version) {

Version parsedVersion = new Version();

// remove "-ci.1" suffix
Matcher ciSuffixMatcher = CI_SUFFIX_PATTERN.matcher(version);
version = ciSuffixMatcher.replaceAll("");

parsedVersion.fullVersion = version;
Matcher matcher = VERSION_PATTERN.matcher(version);
if (matcher.find()) {
Expand Down Expand Up @@ -277,7 +282,7 @@ public static DevelopmentStage parse(String stage) {
} else if (stage.equals(BETA.stage)) {
return BETA;
}
LOGGER.warn("Unknown development stage: " + stage);
LOGGER.warn("Unknown development stage: {}", stage);
return UNKNOWN;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/csl-locales/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ We welcome contributions to the Citation Style Language (CSL) locale files in th

The CSL locale files provide the standard translations for automatic localization of CSL styles.
As such, the CSL locale files should generally contain the most commonly used translations for a given locale.
Less common translations can be [provided in the individual CSL styles](http://docs.citationstyles.org/en/stable/specification.html#locale) that require them, which will overwrite the CSL locale file translations.
Less common translations can be [provided in the individual CSL styles](https://docs.citationstyles.org/en/stable/specification.html#locale) that require them, which will overwrite the CSL locale file translations.

Because each CSL locale file offers the standard translations for all CSL styles, changes should be made conservatively and carefully.
We will often ask a second native speaker and/or past contributor to look over your proposed changes.

## Licensing and crediting

By creating a pull request, you agree to license your contributions under the [Creative Commons Attribution-ShareAlike 3.0 Unported license](http://creativecommons.org/licenses/by-sa/3.0/) license.
By creating a pull request, you agree to license your contributions under the [Creative Commons Attribution-ShareAlike 3.0 Unported license](https://creativecommons.org/licenses/by-sa/3.0/) license.

In addition, if you're interested in being credited, please add yourself to the locale file as translator. See the example below (both the `<email/>` and `</uri>` elements are optional):

Expand Down
6 changes: 6 additions & 0 deletions src/test/java/org/jabref/logic/util/VersionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,10 @@ public void alphaShouldBeUpdatedToStables() {
List<Version> availableVersions = Arrays.asList(Version.parse("2.8-beta"), stable);
assertEquals(Optional.of(stable), alpha.shouldBeUpdatedTo(availableVersions));
}

@Test
public void ciSuffixShouldBeRemoved() {
Version v50ci = Version.parse("5.0-ci.1");
assertEquals("5.0", v50ci.getFullVersion());
}
}

0 comments on commit 439172b

Please sign in to comment.