Skip to content

Commit

Permalink
Merge pull request #12 from soumyaDghosh/master
Browse files Browse the repository at this point in the history
snap: simplify the source
  • Loading branch information
kz6fittycent committed Jan 23, 2024
2 parents d5fb748 + 1465571 commit d2ea9ef
Showing 1 changed file with 2 additions and 20 deletions.
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

0 comments on commit d2ea9ef

Please sign in to comment.