summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/Makefile4
-rw-r--r--pkg/deb/Makefile5
-rw-r--r--pkg/docker/Makefile6
-rw-r--r--pkg/npm/Makefile10
-rw-r--r--pkg/rpm/Makefile5
5 files changed, 12 insertions, 18 deletions
diff --git a/pkg/Makefile b/pkg/Makefile
index 6001a034..7926606d 100644
--- a/pkg/Makefile
+++ b/pkg/Makefile
@@ -1,8 +1,8 @@
#!/usr/bin/make
-VERSION ?= $(shell grep 'define NXT_VERSION' ../src/nxt_main.h \
- | sed -e 's/^.*"\(.*\)".*/\1/')
+include ../version
+VERSION ?= $(NXT_VERSION)
RELEASE ?= 1
default:
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
index 1a16b6ee..29792f90 100644
--- a/pkg/deb/Makefile
+++ b/pkg/deb/Makefile
@@ -1,11 +1,10 @@
#!/usr/bin/make
-DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \
- | sed -e 's/^.*"\(.*\)".*/\1/')
+include ../../version
DEFAULT_RELEASE := 1
-VERSION ?= $(DEFAULT_VERSION)
+VERSION ?= $(NXT_VERSION)
RELEASE ?= $(DEFAULT_RELEASE)
SRCDIR= unit-$(VERSION)
diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile
index 140ac5b3..cf6de78d 100644
--- a/pkg/docker/Makefile
+++ b/pkg/docker/Makefile
@@ -1,10 +1,10 @@
#!/usr/bin/make
-DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \
- | sed -e 's/^.*"\(.*\)".*/\1/')
+include ../../version
+
DEFAULT_RELEASE := 1
-VERSION ?= $(DEFAULT_VERSION)
+VERSION ?= $(NXT_VERSION)
RELEASE ?= $(DEFAULT_RELEASE)
CODENAME := stretch
diff --git a/pkg/npm/Makefile b/pkg/npm/Makefile
index dfa9ccdc..8636dd0b 100644
--- a/pkg/npm/Makefile
+++ b/pkg/npm/Makefile
@@ -1,13 +1,9 @@
#!/usr/bin/make
-DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \
- | sed -e 's/^.*"\(.*\)".*/\1/')
+include ../../version
-DEFAULT_VERNUM := $(shell grep 'define NXT_VERNUM' ../../src/nxt_main.h \
- | sed -e 's/[^0-9]//g')
-
-VERSION ?= $(DEFAULT_VERSION)
-VERNUM ?= $(DEFAULT_VERNUM)
+VERSION ?= $(NXT_VERSION)
+VERNUM ?= $(NXT_VERNUM)
NPM ?= npm
default:
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index fdc31302..2157e808 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -1,11 +1,10 @@
#!/usr/bin/make
-DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \
- | sed -e 's/^.*"\(.*\)".*/\1/')
+include ../../version
DEFAULT_RELEASE := 1
-VERSION ?= $(DEFAULT_VERSION)
+VERSION ?= $(NXT_VERSION)
RELEASE ?= $(DEFAULT_RELEASE)
ifeq ($(shell rpm --eval "%{?rhel}"), 6)