is getting wrong version with version script on amd64 build

What title says but still why other triplet ARCH builds are getting the correct version from using the same version script but amd64 one fail to get the correct but rather it picks the old version.

Even I’ve tried completely remove the snap repo from build io then re-added then build fresh but still same issue.

version script

    override-build: |
      snapcraftctl build
      set -ex
      ver="$(wget -q -S -O - 2>&1 | grep Stable | awk '{print $2}' | sed 's|Stable(||')"
      bnum="$(wget -q -S -O - 2>&1 | grep Stable | awk '{print $4}' | sed 's|)||')"
      echo $ver.$bnum > $SNAPCRAFT_STAGE/version

You should use snapcraftctl for setting the version, too:

snapcraftctl set-version $ver.$bnum

See Scripting and setting metadata in snapcraft for more info.

Hope this helps.

1 Like