[njs] Using hg archive to make dist.

Dmitry Volyntsev xeioex at nginx.com
Fri Feb 9 16:17:49 UTC 2018


details:   http://hg.nginx.org/njs/rev/2f266ec441c3
branches:  
changeset: 435:2f266ec441c3
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Fri Feb 09 19:16:18 2018 +0300
description:
Using hg archive to make dist.

diffstat:

 Makefile       |  14 ++++++--------
 njs/njscript.h |   2 ++
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (40 lines):

diff -r c69b48375b90 -r 2f266ec441c3 Makefile
--- a/Makefile	Wed Nov 22 20:38:10 2017 +0300
+++ b/Makefile	Fri Feb 09 19:16:18 2018 +0300
@@ -1,5 +1,3 @@
-
-NJS_VER =	0.1.15
 
 NXT_LIB =	nxt
 
@@ -100,12 +98,12 @@ clean:
 	rm -f $(NXT_LIB)/Makefile.conf $(NXT_LIB)/nxt_auto_config.h
 
 dist:
-	make clean
-	mkdir njs-$(NJS_VER)
-	cp -rp configure Makefile LICENSE README CHANGES $(NXT_LIB) njs nginx \
-		njs-$(NJS_VER)
-	tar czf njs-$(NJS_VER).tar.gz njs-$(NJS_VER)
-	rm -rf njs-$(NJS_VER)
+	NJS_VER=`grep NJS_VERSION njs/njscript.h | sed -e 's/.*"\(.*\)".*/\1/'`; \
+	rm -rf njs-$${NJS_VER} \
+	&& hg archive njs-$${NJS_VER}.tar.gz \
+		      -p njs-$${NJS_VER} \
+		      -X ".hg*" \
+	&& echo njs-$${NJS_VER}.tar.gz done
 
 $(NXT_LIB)/nxt_auto_config.h:
 	@echo
diff -r c69b48375b90 -r 2f266ec441c3 njs/njscript.h
--- a/njs/njscript.h	Wed Nov 22 20:38:10 2017 +0300
+++ b/njs/njscript.h	Fri Feb 09 19:16:18 2018 +0300
@@ -7,6 +7,8 @@
 #ifndef _NJSCRIPT_H_INCLUDED_
 #define _NJSCRIPT_H_INCLUDED_
 
+#define NJS_VERSION                 "0.1.15"
+
 
 typedef intptr_t                    njs_ret_t;
 typedef uintptr_t                   njs_index_t;


More information about the nginx-devel mailing list