[Fusionforge-commits] r8626 - trunk

Christian Bayle cbayle at libremir.placard.fr.eu.org
Wed Dec 23 21:49:48 CET 2009


Author: cbayle
Date: 2009-12-23 21:49:48 +0100 (Wed, 23 Dec 2009)
New Revision: 8626

Modified:
   trunk/Makefile
   trunk/Makefile.debian
Log:
Also work if not in a svn co 


Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2009-12-23 12:52:22 UTC (rev 8625)
+++ trunk/Makefile	2009-12-23 20:49:48 UTC (rev 8626)
@@ -7,9 +7,16 @@
 BUILDRESULT=$(CURDIR)/result
 
 VER=$(shell LANG=C grep '>software_version' gforge/common/include/FusionForge.class.php | cut -d\' -f2)
-ID=$(shell LANG=C svnversion)
-URL=$(shell LANG=C svn info | grep 'Root:' | awk '{print $$3}')
-TAG=$(shell LANG=C svn log $(URL) -r $(ID) -l 1 2>/dev/null | awk '{ if ($$1=="Tag-Release") print $$1}')
+in_svn_repo:= $(wildcard .svn/)
+ifeq ($(strip $(in_svn_repo)),)
+	ID=unknown
+	URL=unknown
+	TAG=unknown
+else
+	ID=$(shell LANG=C svnversion)
+	URL=$(shell LANG=C svn info | grep 'Root:' | awk '{print $$3}')
+	TAG=$(shell LANG=C svn log $(URL) -r $(ID) -l 1 2>/dev/null | awk '{ if ($$1=="Tag-Release") print $$1}')
+endif
 ifeq ($(TAG),)
 	VERSION=fusionforge-$(VER)-$(ID)
 else

Modified: trunk/Makefile.debian
===================================================================
--- trunk/Makefile.debian	2009-12-23 12:52:22 UTC (rev 8625)
+++ trunk/Makefile.debian	2009-12-23 20:49:48 UTC (rev 8626)
@@ -28,9 +28,13 @@
 
 gfversion=$(shell head -1 $(PKGNAME)/debian/changelog | sed 's/.*(\(.[^+-]*\).*).*/\1/')
 gfminor=$(shell head -1 $(PKGNAME)/debian/changelog | sed 's/.*(.[^+-]*[+-]\(.*\)).*/\1/')
-svnrev=$(shell LANG=C svn info | grep Revision | cut -d: -f2| sed 's/ //g')
+in_svn_repo:= $(wildcard .svn/) 
+ifeq ($(strip $(in_svn_repo)),) 
+	svnrev=unknown
+else
+	svnrev=$(shell LANG=C svn info | grep Revision | cut -d: -f2| sed 's/ //g')
+endif
 
-
 MINOR=-1
 MINOR=-$(BRANCH)$(svnrev)+$(XDISTRIB)
 




More information about the Fusionforge-commits mailing list