Skip to content

Commit

Permalink
Snapcraft: set version from new xml file (#7031)
Browse files Browse the repository at this point in the history
* Try fo fix snapcraft build with debug switch

* Get version from .jpackage.xml file

* Parse .jpackage.xml file

* try to put app version to image options

Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>
  • Loading branch information
LyzardKing and Siedlerchr committed Oct 19, 2020
1 parent af203b6 commit 79f0221
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
- name: Build snap (1) Run build
uses: snapcore/action-build@v1
id: snapcraft
with:
snapcraft-args: "--debug"
- name: Build snap (2) Upload snap
if: ${{ steps.checksecrets.outputs.secretspresent }}
uses: snapcore/action-publish@v1
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ jlink {
if (OperatingSystem.current().isLinux()) {
imageOptions = [
'--icon', "${projectDir}/src/main/resources/icons/JabRef-icon-64.png",
'--app-version', "${project.version}",
]
installerOptions = [
'--verbose',
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ parts:
- x11-utils
override-build: |
snapcraftctl build
snapcraftctl set-version "$(cat $SNAPCRAFT_PART_INSTALL/lib/app/JabRef.cfg | grep "app.version=" | cut -d'=' -f2)"
snapcraftctl set-version "$(cat $SNAPCRAFT_PART_INSTALL/lib/app/.jpackage.xml | grep "app-version" | cut -d">" -f2 | cut -d"<" -f1)"
sed -i 's|/opt/jabref/lib/jabrefHost.py|/snap/bin/jabref.browser-proxy|g' $SNAPCRAFT_PART_INSTALL/lib/native-messaging-host/*/org.jabref.jabref.json
rm $SNAPCRAFT_PART_INSTALL/bin/JabRef
jabref-launcher:
Expand Down

0 comments on commit 79f0221

Please sign in to comment.