Skip to content

Commit

Permalink
Fix handlng of version/grade strings based on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
theseankelly committed Jun 2, 2020
1 parent ddb08c0 commit 587e2b1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ parts:
ifm3d:
override-pull: |
snapcraftctl pull
snapcraftctl set-version $(cat CMakeLists.txt | sed -ne 's/project(IFM3D VERSION .*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p')-$(git rev-parse --short HEAD)
if [[ $(git branch) == "master" ]]; then
snapcraftctl set-grade "stable"
else
snapcraftctl set-grade "devel"
fi
version="$(git describe --always | sed -e 's/^v//;s/-/+git/;y/-/./;y/_/-/;')"
[ -n "$(echo $version | grep "+git")" ] && grade=devel || grade=stablectl pull
snapcraftctl set-version "$version"
snapcraftctl set-grade "$grade"
plugin: cmake
configflags:
- '-DCMAKE_INSTALL_PREFIX=/usr'
Expand Down

0 comments on commit 587e2b1

Please sign in to comment.