Skip to content

Commit

Permalink
snap: Correct setting version for snapcraftctl set-version
Browse files Browse the repository at this point in the history
The version was not being set correctly when building a tagged release.

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
  • Loading branch information
pqarmitage committed Jul 11, 2020
1 parent 5bd85c0 commit 917f307
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ parts:
override-build: |
snapcraftctl build
VER=$(grep GIT_COMMIT lib/git-commit.h | cut -d'"' -f2)
if [ -z $VER ]; then
VER=`grep "^AC_INIT" configure.ac | tr '[' ']' | cut -d']' -f4`
fi
snapcraftctl set-version $VER
echo -n "Build kernel:"
printf " %d.%d.%d\n" $(printf "%6.6x" $(grep LINUX_VERSION_CODE /usr/include/linux/version.h | sed -e "s/.*CODE //") | sed -e "s/\(..\)\(..\)/0x\1 0x\2 0x/")
Expand Down

0 comments on commit 917f307

Please sign in to comment.