Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not download the entire release for the snap packaging
Browse files Browse the repository at this point in the history
florianvazelle committed Feb 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent fe6ea07 commit 79ce038
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
@@ -190,12 +190,13 @@ butler *ARGS: check-butler
echo "Update version in public/packaging"
# Snap
sed -i "s,version:\ '.*'$,version:\ '{{ game_version }}',g" ./public/packaging/snap/snapcraft.yaml
sed -i "s,archive/refs/tags/.*\.tar\.gz$,archive/refs/tags/{{ game_version }}\.tar\.gz,g" ./public/packaging/snap/snapcraft.yaml
sed -i "s,MechanicalFlower/Marble/.*/public/packaging/org.mechanicalflower.Marble.desktop,MechanicalFlower/Marble/{{ game_version }}/public/packaging/org.mechanicalflower.Marble.desktop,g" ./public/packaging/snap/snapcraft.yaml
sed -i "s,MechanicalFlower/Marble/.*/assets/icon.png,MechanicalFlower/Marble/{{ game_version }}/assets/icon.png,g" ./public/packaging/snap/snapcraft.yaml
sed -i "s,releases/download/.*/Marble-linux-v.*\.zip$,releases/download/{{ game_version }}/Marble-linux-v{{ game_version }}\.zip,g" ./public/packaging/snap/snapcraft.yaml
# AppImage
sed -i "s,releases/download/.*/Marble-linux-v.*\.zip,releases/download/{{ game_version }}/Marble-linux-v{{ game_version }}\.zip,g" ./public/packaging/appimage/recipe.yml
sed -i "s,MechanicalFlower/Marble/.*/public/packaging/org.mechanicalflower.Marble.desktop,MechanicalFlower/Marble/{{ game_version }}/public/packaging/org.mechanicalflower.Marble.desktop,g" ./public/packaging/appimage/recipe.yml
sed -i "s,MechanicalFlower/Marble/.*/assets/icon.png,MechanicalFlower/Marble/{{ game_version }}/assets/icon.png,g" ./public/packaging/appimage/recipe.yml
sed -i "s,releases/download/.*/Marble-linux-v.*\.zip,releases/download/{{ game_version }}/Marble-linux-v{{ game_version }}\.zip,g" ./public/packaging/appimage/recipe.yml

[private]
pre-export: clean-addons makedirs bump-version install-addons import-resources
13 changes: 8 additions & 5 deletions public/packaging/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -24,21 +24,24 @@ apps:
LD_LIBRARY_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio:$SNAP"

parts:
marble-source:
source: https://github.com/MechanicalFlower/Marble/archive/refs/tags/1.6.0.tar.gz
marble-desktop-file:
source: https://raw.githubusercontent.com/MechanicalFlower/Marble/1.6.0/public/packaging/org.mechanicalflower.Marble.desktop
override-build: |
snapcraftctl build
# Icon paths in the desktop file will be rewritten to use ${SNAP}/<file> if specified as desktop file in snapcraft.yaml
sed -i.bak -e "s|Icon=org.mechanicalflower.Marble$|Icon=gui/icon.png|g" ${SNAPCRAFT_PART_SRC}/public/packaging/org.mechanicalflower.Marble.desktop
sed -i.bak -e "s|Icon=org.mechanicalflower.Marble$|Icon=gui/icon.png|g" ${SNAPCRAFT_PART_SRC}/org.mechanicalflower.Marble.desktop
cp ${SNAPCRAFT_PART_SRC}/public/packaging/org.mechanicalflower.Marble.desktop ${SNAPCRAFT_PART_INSTALL}/org.mechanicalflower.Marble.desktop
cp ${SNAPCRAFT_PART_SRC}/org.mechanicalflower.Marble.desktop ${SNAPCRAFT_PART_INSTALL}/org.mechanicalflower.Marble.desktop
plugin: nil
marble-icon:
source: https://raw.githubusercontent.com/MechanicalFlower/Marble/1.6.0/assets/icon.png
plugin: nil
override-prime: |
snapcraftctl prime
mkdir -p ${SNAPCRAFT_PRIME}/gui
cp ${SNAPCRAFT_PART_SRC}/assets/icon.png ${SNAPCRAFT_PRIME}/gui/icon.png
cp ${SNAPCRAFT_PART_SRC}/icon.png ${SNAPCRAFT_PRIME}/gui/icon.png
marble-dist:
source: https://github.com/MechanicalFlower/Marble/releases/download/1.6.0/Marble-linux-v1.6.0.zip
override-build: |

0 comments on commit 79ce038

Please sign in to comment.