diff options
author | Andrei Belov <defan@nginx.com> | 2018-10-25 19:00:07 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2018-10-25 19:00:07 +0300 |
commit | dc3e83f26ce9f92a157d4332c723d531ca411b80 (patch) | |
tree | a723f2ce7d8c91527fdfb94eeae708292a705417 /pkg/npm/Makefile | |
parent | 8b37c0c70a183f19f7f4245ce0825954d8dbcaf7 (diff) | |
parent | fd99a738e586326ee5b40a6bc3d09c64b18f394a (diff) | |
download | unit-dc3e83f26ce9f92a157d4332c723d531ca411b80.tar.gz unit-dc3e83f26ce9f92a157d4332c723d531ca411b80.tar.bz2 |
Merged with the default branch.1.5-1
Diffstat (limited to '')
-rw-r--r-- | pkg/npm/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pkg/npm/Makefile b/pkg/npm/Makefile new file mode 100644 index 00000000..2696c226 --- /dev/null +++ b/pkg/npm/Makefile @@ -0,0 +1,27 @@ +#!/usr/bin/make + +DEFAULT_VERSION := $(shell grep 'define NXT_VERSION' ../../src/nxt_main.h \ + | sed -e 's/^.*"\(.*\)".*/\1/') + +VERSION ?= $(DEFAULT_VERSION) +NPM ?= npm + +default: + @echo "valid targets: all publish clean" + +copy: + cp -rp ../../src/nodejs/unit-http . + mv unit-http/binding_pub.gyp unit-http/binding.gyp + sed -e 's/"version"\s*:.*/"version": "${VERSION}.0",/' \ + unit-http/package.json > unit-http/package.json.tmp + mv unit-http/package.json.tmp unit-http/package.json + +publish: copy + cd unit-http && $(NPM) publish + +all: copy + +clean: + rm -rf unit-http + +.PHONY: default all copy publish clean |