From ab57671418e28c9cabb7f6a3a59ebf13298d0e3b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Tue, 17 May 2011 18:19:18 +0200
Subject: [PATCH] The simplest possible git based autonumbering (idea by
 Julien)

---
 slapos/recipe/erp5/setup.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/slapos/recipe/erp5/setup.py b/slapos/recipe/erp5/setup.py
index 2ff71642b3..19e87ee83b 100644
--- a/slapos/recipe/erp5/setup.py
+++ b/slapos/recipe/erp5/setup.py
@@ -1,7 +1,12 @@
 from setuptools import setup, find_packages
 
+def getGitIteration():
+  import subprocess
+  return str(int(subprocess.Popen(["git", "rev-list", "--count", "HEAD", "--",
+    "."], stdout=subprocess.PIPE).communicate()[0]))
+
 name = "slapos.recipe.erp5"
-version = '1.1-dev-9'
+version = '1.1-dev-' + getGitIteration()
 
 def read(name):
   return open(name).read()
-- 
2.30.9