build/linux: Remove dangling .snap file on CI just in case

After the unsquashfs, the .snap file is simply not needed anymore.
The less the space we use, the better.
This commit is contained in:
Bruno Lopes 2026-02-14 12:58:13 -03:00
parent 552078ae75
commit 2e5bfd458c

View file

@ -41,6 +41,7 @@ if [ -z "$GITLAB_CI" ] || [ "$1" = '--install-snaps' ]; then
curl --progress-bar -L -o ${snap}.snap $(curl --progress-bar -H 'Snap-Device-Series: 16' https://api.snapcraft.io/v2/snaps/info/$snap | jq -r --arg arch "$(dpkg --print-architecture)" '.["channel-map"][] | select(.channel.architecture == $arch and .channel.track == "latest" and .channel.risk == "stable") | .download.url')
mkdir -p /snap/$snap/current
unsquashfs -d /snap/$snap/current ${snap}.snap
rm -f ${snap}.snap
fi
done
if [ "$1" = '--install-snaps' ]; then exit 0; fi