Permalink
Browse files

getversion: update to use the debian-auto one.

The one in munin:devel is not really useful. I decided that non-official
branches shouln't have any official-looking numbering scheme.

That's unusable and therefore wrong.

This patch fixes this.
  • Loading branch information...
steveschnepp committed Oct 22, 2012
1 parent 25985da commit 4589d6f92b024f556cbd3f36716ae5be9c937e9d
Showing with 8 additions and 1 deletion.
  1. +8 −1 getversion
View
@@ -26,15 +26,22 @@ generate_version_string() {
git describe
;;
*)
- git log -n 1 --pretty="${branch}-%ad-%tc" --date=short
+ GIT_REVISION="$(git describe --long | sed 's/-g.*//')"
+ git log -n 1 --pretty="${GIT_REVISION}-${branch}-%ad-%tc" --date=short
;;
esac
}
+generate_version_string_from_dir() {
+ basename $(pwd) | grep -e '^munin-' | cut -c7-
+}
+
if [ -s "RELEASE" ]; then
cat RELEASE
elif [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
generate_version_string
+elif [ ! -z "$(generate_version_string_from_dir)" ]; then
+ generate_version_string_from_dir
else
echo "unknown"
fi

0 comments on commit 4589d6f

Please sign in to comment.