fix flux git tag versioning for snap
name: fluxctl
version-script: |
- FLUX_TAG="$(git tag -l | egrep -v '^(chart-|helm-|master-|pre-split)' | sort -n | tail -n1)"
+ FLUX_TAG="$(git tag -l | egrep -v '^(chart-|helm-|master-|pre-split)' | sort -V | tail -n1)"
if [ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ]
then
- echo $FLUX_TAG
+ echo "$FLUX_TAG"
else
GIT_REV="$(git rev-parse --short HEAD)"
echo "$FLUX_TAG+$GIT_REV"
