Skip to content

Commit c3ab787

Browse files
committed
Merge remote-tracking branch 'upstream/main' into jackson3
* upstream/main: Add smoke tests (#14338) Clean up packages in JabKit (#14335) Output binaries workflow decisions to summary (#14333) New translations jabref_en.properties (Portuguese, Brazilian) (#14332) Check for disk space only once (#14331) Chore(deps): Bump org.glassfish.jersey.core:jersey-server from 3.1.11 to 4.0.0 in /versions (#14305)
2 parents e63a95f + 6ebda27 commit c3ab787

40 files changed

+245
-532
lines changed

.github/workflows/binaries.yml

Lines changed: 82 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -67,69 +67,119 @@ jobs:
6767
run: |
6868
if [[ "$GITHUB_WORKFLOW" == *"early access"* && "$REPO_OWNER" != "JabRef" ]]; then
6969
echo "🚫 Early access workflow for JabRef disabled for non-JabRef owner"
70+
echo "🚫 Early access workflow for JabRef disabled for non-JabRef owner" >> $GITHUB_STEP_SUMMARY
7071
echo "should-build=false" >> "$GITHUB_OUTPUT"
7172
exit 0
7273
fi
7374
7475
if [[ "$EVENT_NAME" != "labeled" || "$LABEL_NAME" == "automerge" || "$LABEL_NAME" == "dev: binaries" ]]; then
7576
echo "📦 build enabled"
77+
echo "📦 build enabled" >> $GITHUB_STEP_SUMMARY
7678
echo "should-build=true" >> "$GITHUB_OUTPUT"
7779
else
7880
echo "🚫 build should be skipped"
81+
echo "🚫 build should be skipped" >> $GITHUB_STEP_SUMMARY
7982
echo "should-build=false" >> "$GITHUB_OUTPUT"
8083
exit 0
8184
fi
8285
8386
if [ -z "$BUILDJABREFPRIVATEKEY" ]; then
87+
echo "🚫 Secret BUILDJABREFPRIVATEKEY not present – skipping upload"
88+
echo "🚫 Secret BUILDJABREFPRIVATEKEY not present – skipping upload"
8489
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
8590
echo "secretspresent=false" >> "$GITHUB_OUTPUT"
86-
echo "🚫 Secret BUILDJABREFPRIVATEKEY not present – skipping upload"
8791
exit 0
8892
fi
8993
echo "secretspresent=true" >> "$GITHUB_OUTPUT"
9094
9195
if [[ "$GITHUB_REF" == refs/heads/gh-readonly-queue* ]]; then
92-
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
9396
echo "🚫 merge queue – skipping upload"
97+
echo "🚫 merge queue – skipping upload" >> $GITHUB_STEP_SUMMARY
98+
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
9499
exit 0
95100
fi
96101
97102
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
103+
echo "tag bulid" >> $GITHUB_STEP_SUMMARY
98104
echo "tagbuild=true" >> "$GITHUB_OUTPUT"
99105
else
106+
echo "no tag bulid" >> $GITHUB_STEP_SUMMARY
100107
echo "tagbuild=false" >> "$GITHUB_OUTPUT"
101108
fi
102109
103110
if [[ "${GITHUB_REF}" == refs/tags/* ]] || [[ "${{ inputs.notarization }}" == "true" ]]; then
104111
# This workflow runs on ubuntu-latest even for notarization for macOS; need to check later if really on macOS
105112
echo "🧾 macOS notarization"
113+
echo "🧾 macOS notarization" >> $GITHUB_STEP_SUMMARY
106114
echo "should-notarize=true" >> "$GITHUB_OUTPUT"
107115
echo "☁️ will upload"
116+
echo "☁️ will upload" >> $GITHUB_STEP_SUMMARY
108117
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
109118
exit 0;
110119
else
111120
echo "🚫 no macOS notarization"
121+
echo "🚫 no macOS notarization" >> $GITHUB_STEP_SUMMARY
112122
echo "should-notarize=false" >> "$GITHUB_OUTPUT"
113123
fi
114124
115125
if [ "${{ github.event_name }}" != "pull_request" ]; then
116-
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
117126
echo "☁️ Non-PR event – will upload"
127+
echo "☁️ Non-PR event – will upload" >> $GITHUB_STEP_SUMMARY
128+
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
118129
exit 0
119130
fi
120131
121132
LABELS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels --jq '.[].name')
122133
123134
if echo "$LABELS" | grep -q "^dev: binaries$"; then
124-
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
125135
echo "☁️ Label 'dev: binaries' found – will upload"
136+
echo "☁️ Label 'dev: binaries' found – will upload" >> $GITHUB_STEP_SUMMARY
137+
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
126138
else
127-
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
128139
echo "🚫 Label 'dev: binaries' not found – skipping upload"
140+
echo "🚫 Label 'dev: binaries' not found – skipping upload" >> $GITHUB_STEP_SUMMARY
141+
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
142+
fi
143+
144+
disk-space-check:
145+
needs: conditions
146+
runs-on: ubuntu-latest
147+
outputs:
148+
available: ${{ steps.diskspace.outputs.available }}
149+
steps:
150+
- name: No upload
151+
if: needs.conditions.outputs.upload-to-builds-jabref-org == 'false'
152+
shell: bash
153+
run: |
154+
echo "🚫 no upload – skipping upload"
155+
echo "🚫 no upload – skipping upload" >> $GITHUB_STEP_SUMMARY
156+
echo "available=false" >> "$GITHUB_OUTPUT"
157+
- name: Setup SSH key
158+
if: needs.conditions.outputs.upload-to-builds-jabref-org == 'true'
159+
run: |
160+
echo "${{ secrets.buildJabRefPrivateKey }}" > sshkey
161+
chmod 600 sshkey
162+
- name: Check disk space on builds.jabref.org
163+
if: needs.conditions.outputs.upload-to-builds-jabref-org == 'true'
164+
shell: bash
165+
run: |
166+
USAGE=$(ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no [email protected] \
167+
"df --output=pcent /var/www/builds.jabref.org | tail -n1 | tr -dc '0-9'")
168+
echo "Remote usage: ${USAGE}%"
169+
echo "Remote usage: ${USAGE}%" >> $GITHUB_STEP_SUMMARY
170+
171+
if [ "$USAGE" -lt 80 ]; then
172+
echo "☁️ enough disk space available – will upload"
173+
echo "☁️ enough disk space available – will upload" >> $GITHUB_STEP_SUMMARY
174+
echo "available=true" >> "$GITHUB_OUTPUT"
175+
else
176+
echo "🚫 not enough disk space – skipping upload"
177+
echo "🚫 not enough disk space – skipping upload" >> $GITHUB_STEP_SUMMARY
178+
echo "available=false" >> "$GITHUB_OUTPUT"
129179
fi
130180
131181
build:
132-
needs: [conditions]
182+
needs: [conditions, disk-space-check]
133183
if: ${{ needs.conditions.outputs.should-build == 'true' }}
134184
strategy:
135185
fail-fast: false
@@ -238,6 +288,10 @@ jobs:
238288
- name: Build runtime image and installer
239289
shell: bash
240290
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabgui:jpackage
291+
- name: Smoke test JabGui
292+
shell: bash
293+
run: |
294+
./gradlew :jabgui:run --args="--help"
241295
- name: Package JabGui application image
242296
shell: bash
243297
run: |
@@ -261,9 +315,18 @@ jobs:
261315
rm debian-binary control.tar.* data.tar.*
262316
mv -f jabref_${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}${{ matrix.suffix }}${{ matrix.archForDebianRepack }}_repackaged.deb jabref_${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}${{ matrix.suffix }}.deb
263317
318+
- name: Smoke test JabSrv-CLI
319+
shell: bash
320+
run: |
321+
./gradlew :jabsrv-cli:run --args="--help"
322+
264323
- name: Build JabKit
265324
shell: bash
266325
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabkit:jpackage
326+
- name: Smoke test JabKit
327+
shell: bash
328+
run: |
329+
./gradlew :jabkit:run --args="--help"
267330
- name: Package JabKit application image
268331
shell: bash
269332
run: |
@@ -273,6 +336,10 @@ jobs:
273336
- name: Build JabLS-CLI
274337
shell: bash
275338
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabls-cli:jpackage
339+
- name: Smoke test JabLs-CLI
340+
shell: bash
341+
run: |
342+
./gradlew :jabls-cli:run --args="--help"
276343
- name: Package JabLS-CLI application image
277344
shell: bash
278345
run: |
@@ -281,62 +348,49 @@ jobs:
281348
282349
# region Upload to builds.jabref.org / GitHub artifacts store
283350
- name: Setup SSH key
284-
if: (needs.conditions.outputs.upload-to-builds-jabref-org == 'true')
351+
if: ${{ needs.disk-space-check.available == 'true' }}
285352
run: |
286353
echo "${{ secrets.buildJabRefPrivateKey }}" > sshkey
287354
chmod 600 sshkey
288-
- name: Check disk space on builds.jabref.org
289-
if: (needs.conditions.outputs.upload-to-builds-jabref-org == 'true')
290-
id: diskspace
291-
shell: bash
292-
run: |
293-
USAGE=$(ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no [email protected] \
294-
"df --output=pcent /var/www/builds.jabref.org | tail -n1 | tr -dc '0-9'")
295-
echo "Remote usage: $USAGE%"
296-
if [ "$USAGE" -lt 90 ]; then
297-
echo "available=true" >> "$GITHUB_OUTPUT"
298-
else
299-
echo "available=false" >> "$GITHUB_OUTPUT"
300-
fi
301355
- name: Setup rsync (macOS)
302-
if: ${{ (steps.diskspace.outputs.available == 'true') && (startsWith(matrix.os, 'macos') && (needs.conditions.outputs.upload-to-builds-jabref-org == 'true')) }}
356+
if: ${{ (needs.disk-space-check.available == 'true') && (startsWith(matrix.os, 'macos') && (needs.conditions.outputs.upload-to-builds-jabref-org == 'true')) }}
303357
run: brew install rsync
304358
- name: Setup rsync (Windows)
305-
if: ${{ (steps.diskspace.outputs.available == 'true') && (matrix.os == 'windows-latest') }}
359+
if: ${{ (needs.disk-space-check.available == 'true') && (matrix.os == 'windows-latest') }}
306360
# We want to have rsync available at this place to avoid uploading and downloading from GitHub artifact store (taking > 5 minutes in total)
307361
# We cannot use "action-rsyncer", because that requires Docker which is unavailable on Windows
308362
# We cannot use "setup-rsync", because that does not work on Windows
309363
# We do not use egor-tensin/setup-cygwin@v4, because it replaces the default shell
310364
# We need to use v6.4.4 as v6.4.5 misses "lib\rsync\tools\bin\ssh.exe"
311365
run: choco install rsync --version=6.4.4
312366
- name: Upload jabgui to builds.jabref.org (Windows)
313-
if: ${{ (steps.diskspace.outputs.available == 'true') && (matrix.os == 'windows-latest') }}
367+
if: ${{ (needs.disk-space-check.available == 'true') && (matrix.os == 'windows-latest') }}
314368
shell: cmd
315369
# for rsync installed by chocolatey, we need the ssh.exe delivered with that installation
316370
run: |
317371
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabgui/build/packages/${{ matrix.os }}/ [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
318372
- name: Upload jabkkit to builds.jabref.org (Windows)
319-
if: ${{ (steps.diskspace.outputs.available == 'true') && (matrix.os == 'windows-latest') }}
373+
if: ${{ (needs.disk-space-check.available == 'true') && (matrix.os == 'windows-latest') }}
320374
shell: cmd
321375
run: |
322376
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabkit/build/packages/${{ matrix.os }}/ [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
323377
- name: Upload jabls-cli to builds.jabref.org (Windows)
324-
if: ${{ (steps.diskspace.outputs.available == 'true') && (matrix.os == 'windows-latest') }}
378+
if: ${{ (needs.disk-space-check.available == 'true') && (matrix.os == 'windows-latest') }}
325379
shell: cmd
326380
run: |
327381
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabls-cli/build/packages/${{ matrix.os }}/ [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
328382
- name: Upload jabgui to builds.jabref.org (linux, macOS)
329-
if: ${{ (steps.diskspace.outputs.available == 'true') && ((startsWith(matrix.os, 'macos') && (needs.conditions.outputs.should-notarize != 'true')) || startsWith(matrix.os, 'ubuntu')) }}
383+
if: ${{ (needs.disk-space-check.available == 'true') && ((startsWith(matrix.os, 'macos') && (needs.conditions.outputs.should-notarize != 'true')) || startsWith(matrix.os, 'ubuntu')) }}
330384
shell: bash
331385
run: |
332386
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabgui/build/packages/${{ matrix.os }}/ [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
333387
- name: Upload jabkit to builds.jabref.org (linux, macOS)
334-
if: ${{ (steps.diskspace.outputs.available == 'true') && (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')) }}
388+
if: ${{ (needs.disk-space-check.available == 'true') && (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')) }}
335389
shell: bash
336390
run: |
337391
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabkit/build/packages/${{ matrix.os }}/ [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
338392
- name: Upload jabls-cli to builds.jabref.org (linux, macOS)
339-
if: ${{ (steps.diskspace.outputs.available == 'true') && (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')) }}
393+
if: ${{ (needs.disk-space-check.available == 'true') && (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')) }}
340394
shell: bash
341395
run: |
342396
rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabls-cli/build/packages/${{ matrix.os }}/ [email protected]:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true

.jbang/JabKitLauncher.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
//JAVA 24
66
//RUNTIME_OPTIONS --enable-native-access=ALL-UNNAMED
77

8-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/converter/CygWinPathConverter.java
9-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/ArgumentProcessor.java
10-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/CheckConsistency.java
11-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/CheckIntegrity.java
12-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/Convert.java
13-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/DoiToBibtex.java
14-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/Fetch.java
15-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/GenerateBibFromAux.java
16-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/GenerateCitationKeys.java
17-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/Pdf.java
18-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/PdfUpdate.java
19-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/Preferences.java
20-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/Pseudonymize.java
21-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/cli/Search.java
22-
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/JabKit.java
8+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/converter/CygWinPathConverter.java
9+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/JabKit.java
10+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/CheckConsistency.java
11+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/CheckIntegrity.java
12+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/Convert.java
13+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/DoiToBibtex.java
14+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/Fetch.java
15+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/GenerateBibFromAux.java
16+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/GenerateCitationKeys.java
17+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/Pdf.java
18+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/PdfUpdate.java
19+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/Preferences.java
20+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/Pseudonymize.java
21+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/commands/Search.java
22+
//SOURCES ../jabkit/src/main/java/org/jabref/toolkit/JabKitLauncher.java
2323
//FILES tinylog.properties=../jabkit/src/main/resources/tinylog.properties
2424

2525
// raw is for https://github.com/unicode-org/icu/pull/2127
@@ -33,6 +33,6 @@
3333
/// This class is required for [jbang](https://www.jbang.dev/)
3434
public class JabKitLauncher {
3535
public static void main(String[] args) {
36-
org.jabref.toolkit.JabKit.main(args);
36+
org.jabref.toolkit.JabKitLauncher.main(args);
3737
}
3838
}

0 commit comments

Comments
 (0)