Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snap: simplify the source #12

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,8 @@ base: core22

parts:
cpod:
plugin: nil
override-build: |
set -xeu
craftctl default
# Get the latest releases json
echo "Get GitHub releases..."
wget --quiet https://api.github.com/repos/z-------------/CPod/releases -O releases.json
# Get the version from the tag_name and the download URL.
VERSION=$(jq . releases.json | grep tag_name | cut -d'"' -f4 | sed s'/v//' | head -n 1)
DEB_URL=$(grep browser_download releases.json | grep "${VERSION}" | grep deb | cut -d'"' -f4)
echo "Downloading ${DEB_URL}..."
wget --quiet "${DEB_URL}" -O cpod.deb
echo "Unpacking cpod.deb..."
dpkg -x cpod.deb ${CRAFT_PART_INSTALL}
rm cpod.deb releases.json
sed -i 's|Icon=cpod|Icon=${SNAP}/usr/share/icons/hicolor/512x512/apps/cpod.png|' $CRAFT_PART_INSTALL/usr/share/applications/cpod.desktop
build-packages:
- dpkg
- jq
- wget
plugin: dump
source: https://github.com/z-------------/CPod/releases/download/v${SNAPCRAFT_PROJECT_VERSION}/CPod_${SNAPCRAFT_PROJECT_VERSION}_amd64.deb
stage-packages:
- libnspr4
- libnss3
Expand Down
Loading