Updated building Snap

This commit is contained in:
Lauri Ojansivu 2025-07-05 16:59:33 +03:00
parent 0921c6ea53
commit aa681cde88
3 changed files with 43 additions and 20 deletions

View file

@ -1,18 +0,0 @@
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Use: snapcraft login"
echo "Then use version number:"
echo " ./releases/snap-build-push-edge-candidate.sh 7.88"
exit 1
fi
sudo apt -y install snapd
sudo systemctl enable snapd
sudo systemctl start snapd
sudo snap install snapcraft --classic
sudo snap install multipass
multipass launch --name ubu
snapcraft
snapcraft upload --release=candidate,edge wekan_$1_amd64.snap

33
releases/snap-build.sh Executable file
View file

@ -0,0 +1,33 @@
#!/bin/bash
echo "First run: snapcraft login"
echo "Then run this script"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "Linux"
sudo apt-get -y install snapd
sudo systemctl enable snapd
sudo systemctl start snapd
sudo snap install snapcraft --classic
sudo snap install multipass
multipass launch --name ubu
snapcraft
exit;
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "macOS"
brew install snapcraft
brew install multipass
# Launch multipass VM if needed
if ! multipass list | grep -q "ubu.*Running"; then
multipass launch --name ubu
fi
# Build with platform specified for macOS
snapcraft --use-lxd --platform=amd64 --build-for=amd64
exit;
else
echo "Unknown OS: $OSTYPE"
echo "Please install snapcraft and multipass manually."
exit;
fi

View file

@ -13,12 +13,20 @@ description: |
confinement: strict
grade: stable
# Update platforms format to correct syntax for core24
# Use platforms instead of architectures for core24 base
platforms:
amd64:
build-on: amd64
build-on: [amd64, arm64]
build-for: amd64
# Remove architectures section (not compatible with core24)
# architectures: [amd64]
# The previous format was incorrect:
# architectures:
# - build-on: amd64
# run-on: amd64
plugs:
mongodb-plug:
interface: content