Skip to content

Commit 439172b

Browse files
committed
Merge remote-tracking branch 'upstream/master'
* 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
2 parents cb699a4 + d8ef173 commit 439172b

File tree

8 files changed

+170
-89
lines changed

8 files changed

+170
-89
lines changed

.github/workflows/deployment.yml

+13-47
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,16 @@ jobs:
4343

4444
steps:
4545
- name: Checkout source
46-
uses: actions/checkout@v2-beta
47-
with:
48-
fetch-depth: 0
49-
- name: Fetch tags and master for GitVersion
50-
run: |
51-
git fetch --tags origin
52-
git rev-parse --verify master
53-
if (-not $?) {
54-
git branch --force --create-reflog master origin/master
55-
}
56-
shell: pwsh
46+
uses: actions/checkout@v2
47+
- name: Fetch all history for all tags and branches
48+
run: git fetch --prune --unshallow
5749
- name: Install GitVersion
58-
uses: gittools/actions/setup-gitversion@v0.3
50+
uses: gittools/actions/gitversion/setup@v0.9.1
5951
with:
60-
versionSpec: '5.1.2'
52+
versionSpec: '5.1.3'
6153
- name: Run GitVersion
6254
id: gitversion
63-
uses: gittools/actions/execute-gitversion@v0.3
55+
uses: gittools/actions/gitversion/execute@v0.9.1
6456
- name: Set up JDK
6557
uses: actions/setup-java@v1
6658
with:
@@ -111,25 +103,6 @@ jobs:
111103
export BADASS_JLINK_JPACKAGE_HOME="${GITHUB_WORKSPACE}${{ matrix.jdk14Path }}"
112104
./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jpackage
113105
shell: bash
114-
- name: Package application image
115-
run: ${{ matrix.archivePortable }}
116-
shell: bash
117-
- name: Build snap (1) Setup snapcraft
118-
uses: jhenstridge/snapcraft-build-action@v1
119-
id: snapcraft
120-
if: matrix.displayName == 'linux'
121-
- name: Build snap (2) Run build
122-
run: |
123-
mv ${{ steps.snapcraft.outputs.snap }} build/distribution/
124-
if: matrix.displayName == 'linux'
125-
- name: Build snap (3) Upload snap
126-
if: matrix.displayName == 'linux' && github.ref == 'refs/heads/master'
127-
env:
128-
SNAPCRAFT_LOGIN_FILE: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
129-
run: |
130-
mkdir .snapcraft && echo ${SNAPCRAFT_LOGIN_FILE} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg
131-
snapcraft push build/distribution/jabref*.snap --release edge || true
132-
shell: bash
133106
- name: Rename files
134107
run: |
135108
get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "${{ steps.gitversion.outputs.AssemblySemVer }}","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}"}
@@ -146,24 +119,16 @@ jobs:
146119
needs: [build]
147120
steps:
148121
- name: Checkout source
149-
uses: actions/checkout@v2-beta
150-
with:
151-
fetch-depth: 0
152-
- name: Fetch tags and master for GitVersion
153-
run: |
154-
git fetch --tags origin
155-
git rev-parse --verify master
156-
if (-not $?) {
157-
git branch --force --create-reflog master origin/master
158-
}
159-
shell: pwsh
122+
uses: actions/checkout@v2
123+
- name: Fetch all history for all tags and branches
124+
run: git fetch --prune --unshallow
160125
- name: Install GitVersion
161-
uses: gittools/actions/setup-gitversion@v0.3
126+
uses: gittools/actions/gitversion/setup@v0.9.1
162127
with:
163-
versionSpec: '5.1.2'
128+
versionSpec: '5.1.3'
164129
- name: Run GitVersion
165130
id: gitversion
166-
uses: gittools/actions/execute-gitversion@v0.3
131+
uses: gittools/actions/gitversion/execute@v0.9.1
167132
- name: Get linux binaries
168133
uses: actions/download-artifact@master
169134
with:
@@ -191,3 +156,4 @@ jobs:
191156
ssh_options: '-p 9922'
192157
src: 'build/distribution/'
193158
dest: jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/
159+

.github/workflows/snap.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Snap
2+
3+
on:
4+
schedule:
5+
# run on each day
6+
- cron: '33 4 * * *'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
name: Create snapcraft image
12+
13+
steps:
14+
- name: Checkout source
15+
uses: actions/checkout@v2
16+
# The image relies on https://builds.jabref.org/master/JabRef-5.0-portable_linux.tar.gz^
17+
# See snap/snapcraft.yml for details
18+
- name: Build snap (1) Run build
19+
uses: jhenstridge/snapcraft-build-action@v1
20+
id: snapcraft
21+
- name: Build snap (2) Upload snap
22+
uses: jhenstridge/snapcraft-publish-action@v1
23+
with:
24+
store_login: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
25+
snap: ${{ steps.snapcraft.outputs.snap }}
26+
release: edge

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Here, the categories "Changed" for added and changed functionality,
99

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

12-
## [Unreleased]
12+
## [5.0] – 2020-03-03
1313

1414
### Changed
1515

@@ -284,7 +284,8 @@ The changelog of JabRef 4.x is available at the [v4.x branch](https://github.com
284284
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).
285285
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).
286286

287-
[Unreleased]: https://github.com/JabRef/jabref/compare/v5.0-beta...HEAD
287+
[Unreleased]: https://github.com/JabRef/jabref/compare/v5.0...HEAD
288+
[5.0]: https://github.com/JabRef/jabref/compare/v5.0-beta...v5.0
288289
[5.0-beta]: https://github.com/JabRef/jabref/compare/v5.0-alpha...v5.0-beta
289290
[5.0-alpha]: https://github.com/JabRef/jabref/compare/v4.3...v5.0-alpha
290291

GitVersion.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ mode: ContinuousDeployment
55
branches:
66
master:
77
regex: ^master
8-
tag: beta
9-
pre-release-weight: 30000 # 0 after stable release, 15000 before alpha release, 30000 before beta release, 50000 before stable release
8+
tag: ''
9+
pre-release-weight: 50000 # 0 after stable release, 15000 before alpha release, 30000 before beta release, 50000 before stable release

external-libraries.txt

+111-34
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This file is manually kept in sync with build.gradle and the binary jars contain
55

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

910
## Legend
1011

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

3940
(Sorted alphabetically by Id)
4041

41-
Id: com.airhacks:afterburner.fx
42-
Project: afterburner.fx
43-
URL: https://github.com/AdamBien/afterburner.fx
44-
License: Apache-2.0
45-
46-
Id: com.apple:AppleJavaExtensions
47-
Project: AppleJavaExtensions
48-
URL: https://developer.apple.com/legacy/library/samplecode/AppleJavaExtensions/Introduction/Intro.html
49-
License: Apple License
50-
5142
Id: com.github.tomtung
5243
Project: latex2unicode
5344
URL: https://github.com/tomtung/latex2unicode
5445
License: Apache-2.0
5546

47+
Id: com.google.code.gson:gson
48+
Project: Google Guava
49+
URL: https://github.com/google/gson
50+
License: Apache-2.0
51+
52+
Id: com.google.guava:failureaccess
53+
Project: Google Guava
54+
URL: https://github.com/google/guava
55+
License: Apache-2.0
56+
Note: See https://github.com/google/guava/issues/3437 for a discussion that this dependency is really required.
57+
5658
Id: com.google.guava:guava
5759
Project: Google Guava
5860
URL: https://github.com/google/guava
5961
License: Apache-2.0
6062

61-
Id: com.impossibl.pgjdbc-ng:pgjdbc-ng
62-
Project: pgjdbc-ng
63-
URL: http://impossibl.github.io/pgjdbc-ng
64-
License: BSD-3-Clause
63+
Id: com.google.j2objc:j2objc-annotations
64+
Project: j2objc-annotations
65+
URL: https://github.com/google/j2objc
66+
License: Apache-2.0
6567

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

86-
Id: com.sibvisions.external.jvxfx:DnDTabPane
87-
Project: Drag'n'Drop TabPane
88-
URL: https://github.com/sibvisions/javafx.DndTabPane
89-
License: EPL-1.0
90-
9188
Id: commons-cli:commons-cli
9289
Project: Apache Commons CLI
9390
URL: http://commons.apache.org/cli/
@@ -98,11 +95,6 @@ Project: Apache Commons Logging
9895
URL: http://commons.apache.org/logging/
9996
License: Apache-2.0
10097

101-
Id: de.codecentric.centerdevice
102-
Project: javafxsvg
103-
URL: https://github.com/codecentric/javafxsvg
104-
License: BSD 3-Clause
105-
10698
Id: de.jensd:fontawesomefx-materialdesignfont
10799
Project: FontAwesomeFX
108100
URL: https://bitbucket.org/Jerady/fontawesomefx
@@ -208,7 +200,7 @@ Project: ControlsFX
208200
URL: http://fxexperience.com/controlsfx/
209201
License: BSD-3-Clause
210202

211-
Id: org.fx.misc.easybind:easybind
203+
Id: org.fxmisc.easybind:easybind
212204
Project: EasyBind
213205
URL: https://github.com/TomasMikula/EasyBind
214206
License: BSD-2-Clause
@@ -288,12 +280,97 @@ Project: OpenOffice.org
288280
URL: http://www.openoffice.org/api/SDK
289281
License: Apache-2.0
290282

291-
Id: org.xmlunit:xmlunit-core
292-
Project: XMLUnit
293-
URL: http://www.xmlunit.org/
294-
License: Apache-2.0
295-
296-
Id: org.xmlunit:xmlunit-matchers
297-
Project: XMLUnit
298-
URL: http://www.xmlunit.org/
299-
License: Apache-2.0
283+
## Sorted list of runtime dependencies output by gradle
284+
285+
```text
286+
com.github.tomtung:latex2unicode_2.12:0.2.6
287+
com.google.code.gson:gson:2.8.6
288+
com.google.errorprone:error_prone_annotations:2.3.4
289+
com.google.guava:failureaccess:1.0.1
290+
com.google.guava:guava:28.2-jre
291+
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
292+
com.google.j2objc:j2objc-annotations:1.3
293+
com.ibm.icu:icu4j:62.1
294+
com.jfoenix:jfoenix:9.0.9
295+
com.konghq:unirest-java:3.6.00
296+
com.microsoft.azure:applicationinsights-core:2.4.1
297+
com.microsoft.azure:applicationinsights-logging-log4j2:2.4.1
298+
com.oracle.ojdbc:ojdbc10:19.3.0.0
299+
com.oracle.ojdbc:ons:19.3.0.0
300+
com.oracle.ojdbc:osdt_cert:19.3.0.0
301+
com.oracle.ojdbc:osdt_core:19.3.0.0
302+
com.oracle.ojdbc:simplefan:19.3.0.0
303+
com.oracle.ojdbc:ucp:19.3.0.0
304+
com.sun.istack:istack-commons-runtime:3.0.8
305+
com.sun.xml.fastinfoset:FastInfoset:1.2.16
306+
commons-cli:commons-cli:1.4
307+
commons-codec:commons-codec:1.11
308+
commons-logging:commons-logging:1.2
309+
de.jensd:fontawesomefx-commons:11.0
310+
de.jensd:fontawesomefx-materialdesignfont:1.7.22-11
311+
de.saxsys:mvvmfx-validation:1.9.0-SNAPSHOT
312+
de.saxsys:mvvmfx:1.8.0
313+
de.undercouch:citeproc-java:2.1.0-SNAPSHOT
314+
eu.lestard:doc-annotations:0.2
315+
info.debatty:java-string-similarity:1.2.1
316+
io.github.java-diff-utils:java-diff-utils:4.5
317+
jakarta.activation:jakarta.activation-api:1.2.1
318+
jakarta.annotation:jakarta.annotation-api:1.3.5
319+
jakarta.xml.bind:jakarta.xml.bind-api:2.3.2
320+
net.jcip:jcip-annotations:1.0
321+
net.jodah:typetools:0.6.1
322+
org.antlr:antlr-runtime:3.5.2
323+
org.antlr:antlr4-runtime:4.8-1
324+
org.apache.commons:commons-csv:1.8
325+
org.apache.commons:commons-lang3:3.9
326+
org.apache.commons:commons-text:1.8
327+
org.apache.httpcomponents:httpasyncclient:4.1.4
328+
org.apache.httpcomponents:httpclient:4.5.11
329+
org.apache.httpcomponents:httpcore-nio:4.4.13
330+
org.apache.httpcomponents:httpcore:4.4.13
331+
org.apache.httpcomponents:httpmime:4.5.11
332+
org.apache.logging.log4j:log4j-api:3.0.0-SNAPSHOT
333+
org.apache.logging.log4j:log4j-core:3.0.0-SNAPSHOT
334+
org.apache.logging.log4j:log4j-jcl:3.0.0-SNAPSHOT
335+
org.apache.logging.log4j:log4j-plugins:3.0.0-SNAPSHOT
336+
org.apache.logging.log4j:log4j-slf4j18-impl:3.0.0-SNAPSHOT
337+
org.apache.pdfbox:fontbox:2.0.18
338+
org.apache.pdfbox:pdfbox:2.0.18
339+
org.apache.pdfbox:xmpbox:2.0.18
340+
org.apache.tika:tika-core:1.23
341+
org.bouncycastle:bcprov-jdk15on:1.64
342+
org.checkerframework:checker-qual:2.10.0
343+
org.controlsfx:controlsfx:11.0.1
344+
org.fxmisc.easybind:easybind:1.0.3
345+
org.fxmisc.flowless:flowless:0.6.1
346+
org.fxmisc.richtext:richtextfx:0.10.4
347+
org.fxmisc.undo:undofx:2.1.0
348+
org.fxmisc.wellbehaved:wellbehavedfx:0.3.3
349+
org.glassfish.hk2.external:jakarta.inject:2.6.1
350+
org.glassfish.jaxb:jaxb-runtime:2.3.2
351+
org.glassfish.jaxb:txw2:2.3.2
352+
org.graalvm.js:js:19.2.1
353+
org.graalvm.regex:regex:19.2.1
354+
org.graalvm.sdk:graal-sdk:19.2.1
355+
org.graalvm.truffle:truffle-api:19.2.1
356+
org.jbibtex:jbibtex:1.0.17
357+
org.jsoup:jsoup:1.13.1
358+
org.jvnet.staxex:stax-ex:1.8.1
359+
org.mariadb.jdbc:mariadb-java-client:2.5.4
360+
org.openjfx:javafx-base:13.0.2
361+
org.openjfx:javafx-controls:13.0.2
362+
org.openjfx:javafx-fxml:13.0.2
363+
org.openjfx:javafx-graphics:13.0.2
364+
org.openjfx:javafx-media:13.0.2
365+
org.openjfx:javafx-swing:13.0.2
366+
org.openjfx:javafx-web:13.0.2
367+
org.ow2.asm:asm-analysis:6.2.1
368+
org.ow2.asm:asm-commons:6.2.1
369+
org.ow2.asm:asm-tree:6.2.1
370+
org.ow2.asm:asm-util:6.2.1
371+
org.ow2.asm:asm:6.2.1
372+
org.postgresql:postgresql:42.2.10
373+
org.reactfx:reactfx:2.0-M5
374+
org.scala-lang:scala-library:2.12.8
375+
org.slf4j:slf4j-api:2.0.0-alpha1
376+
```

src/main/java/org/jabref/logic/util/Version.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ public class Version {
2929
private static final Version UNKNOWN_VERSION = new Version();
3030

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

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

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

5960
Version parsedVersion = new Version();
6061

62+
// remove "-ci.1" suffix
63+
Matcher ciSuffixMatcher = CI_SUFFIX_PATTERN.matcher(version);
64+
version = ciSuffixMatcher.replaceAll("");
65+
6166
parsedVersion.fullVersion = version;
6267
Matcher matcher = VERSION_PATTERN.matcher(version);
6368
if (matcher.find()) {
@@ -277,7 +282,7 @@ public static DevelopmentStage parse(String stage) {
277282
} else if (stage.equals(BETA.stage)) {
278283
return BETA;
279284
}
280-
LOGGER.warn("Unknown development stage: " + stage);
285+
LOGGER.warn("Unknown development stage: {}", stage);
281286
return UNKNOWN;
282287
}
283288

src/main/resources/csl-locales/CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ We welcome contributions to the Citation Style Language (CSL) locale files in th
44

55
The CSL locale files provide the standard translations for automatic localization of CSL styles.
66
As such, the CSL locale files should generally contain the most commonly used translations for a given locale.
7-
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.
7+
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.
88

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

1212
## Licensing and crediting
1313

14-
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.
14+
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.
1515

1616
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):
1717

src/test/java/org/jabref/logic/util/VersionTest.java

+6
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,10 @@ public void alphaShouldBeUpdatedToStables() {
282282
List<Version> availableVersions = Arrays.asList(Version.parse("2.8-beta"), stable);
283283
assertEquals(Optional.of(stable), alpha.shouldBeUpdatedTo(availableVersions));
284284
}
285+
286+
@Test
287+
public void ciSuffixShouldBeRemoved() {
288+
Version v50ci = Version.parse("5.0-ci.1");
289+
assertEquals("5.0", v50ci.getFullVersion());
290+
}
285291
}

0 commit comments

Comments
 (0)