I am trying to build and publish a Snap of my application using Github workflow. It is a Rust application and I change version from Cargo.toml file (it contains version details) using shell commands and “snapcraftctl set–version”. In logs it shows that it executes snapcraftctl set-version properly but published snap contains old version only. Here is the relevant part of yaml.
architectures:
- build-on: [amd64,i386]
parts:
mqttwrk:
plugin: rust
source: .
# Extract app version from Cargo.toml and set it as snap's version.
override-pull: |
snapcraftctl pull
snapcraftctl set-version $(cat Cargo.toml | grep version | head -n1 | cut -d"=" -f2 | awk '{$1=$1};1')
snapcraftctl set-grade stable
# Build a snap here.
override-build: |
snapcraftctl build
apps:
mqttwrk:
command: bin/mqttwrk
plugs: [network] # in "strict" confinement we need to specify permission to use network.