[nginx] svn commit: r5132 - trunk/misc

mdounin at mdounin.ru mdounin at mdounin.ru
Fri Mar 22 15:47:19 UTC 2013


Author: mdounin
Date: 2013-03-22 15:47:18 +0000 (Fri, 22 Mar 2013)
New Revision: 5132
URL: http://trac.nginx.org/nginx/changeset/5132/nginx

Log:
Misc: support for Mercurial repositories.


Modified:
   trunk/misc/GNUmakefile

Modified: trunk/misc/GNUmakefile
===================================================================
--- trunk/misc/GNUmakefile	2013-03-22 15:14:43 UTC (rev 5131)
+++ trunk/misc/GNUmakefile	2013-03-22 15:47:18 UTC (rev 5132)
@@ -11,11 +11,8 @@
 PCRE =		pcre-8.32
 
 
-release:
-	rm -rf $(TEMP)
+release: export
 
-	svn export -rHEAD . $(TEMP)/$(NGINX)
-
 	mv $(TEMP)/$(NGINX)/auto/configure $(TEMP)/$(NGINX)
 
 	# delete incomplete sources
@@ -39,7 +36,32 @@
 	tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
 
 
+export:
+	rm -rf $(TEMP)
+
+	if [ -d .svn ]; then						\
+		svn export -rHEAD . $(TEMP)/$(NGINX);			\
+	else								\
+		hg archive -X '.hg*' $(TEMP)/$(NGINX);			\
+	fi
+
+
 RELEASE:
+	if [ -d .svn ]; then						\
+		$(MAKE) -f misc/GNUmakefile RELEASE.svn;		\
+	else								\
+		$(MAKE) -f misc/GNUmakefile RELEASE.hg;			\
+	fi
+
+	$(MAKE) -f misc/GNUmakefile release
+
+
+RELEASE.hg:
+	hg ci -m nginx-$(VER)-RELEASE
+	hg tag -m "release-$(VER) tag" release-$(VER)
+
+	
+RELEASE.svn:
 	test -d $(TEMP) || mkdir -p $(TEMP)
 
 	echo "nginx-$(VER)-RELEASE" > $(TEMP)/message
@@ -51,9 +73,7 @@
 
 	svn up
 
-	$(MAKE) -f misc/GNUmakefile release
 
-
 win32:
 	./auto/configure						\
 		--with-cc=cl						\
@@ -92,12 +112,10 @@
 		--with-mail_ssl_module					\
 		--with-ipv6
 
-zip:
-	rm -rf $(TEMP)
+
+zip: export
 	rm -f $(NGINX).zip
 
-	svn export -rHEAD . $(TEMP)/$(NGINX)
-
 	mkdir -p $(TEMP)/$(NGINX)/docs.new
 	mkdir -p $(TEMP)/$(NGINX)/logs
 	mkdir -p $(TEMP)/$(NGINX)/temp



More information about the nginx-devel mailing list