diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/Makefile | 4 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.full | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.go1.11-dev | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.minimal | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.perl5.28 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.php7.3 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.python2.7 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.python3.7 | 2 | ||||
-rw-r--r-- | pkg/docker/Dockerfile.ruby2.5 | 2 | ||||
-rw-r--r-- | pkg/docker/Makefile | 27 | ||||
-rw-r--r-- | pkg/shasum.mak | 9 |
11 files changed, 43 insertions, 13 deletions
diff --git a/pkg/Makefile b/pkg/Makefile index 7926606d..15ff075d 100644 --- a/pkg/Makefile +++ b/pkg/Makefile @@ -1,6 +1,7 @@ #!/usr/bin/make include ../version +include shasum.mak VERSION ?= $(NXT_VERSION) RELEASE ?= 1 @@ -14,6 +15,7 @@ dist: -r $(VERSION) \ -p unit-$(VERSION) \ -X "../.hg*" -X "../pkg/" -X "../docs/" + $(SHA512SUM) unit-$(VERSION).tar.gz > unit-$(VERSION).tar.gz.sha512 rpm: @cd rpm && VERSION=$(VERSION) RELEASE=$(RELEASE) make all @@ -32,5 +34,7 @@ clean: @cd deb && make clean @cd docker && make clean @cd npm && make clean + rm -f unit-$(VERSION).tar.gz + rm -f unit-$(VERSION).tar.gz.sha512 .PHONY: default rpm deb docker npm clean diff --git a/pkg/docker/Dockerfile.full b/pkg/docker/Dockerfile.full index 60da78db..fb9144c2 100644 --- a/pkg/docker/Dockerfile.full +++ b/pkg/docker/Dockerfile.full @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>" -ENV UNIT_VERSION 1.16.0-1~buster +ENV UNIT_VERSION 1.17.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.go1.11-dev b/pkg/docker/Dockerfile.go1.11-dev index ab9bb699..2b213836 100644 --- a/pkg/docker/Dockerfile.go1.11-dev +++ b/pkg/docker/Dockerfile.go1.11-dev @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>" -ENV UNIT_VERSION 1.16.0-1~buster +ENV UNIT_VERSION 1.17.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.minimal b/pkg/docker/Dockerfile.minimal index 03fab2a2..af97aa4f 100644 --- a/pkg/docker/Dockerfile.minimal +++ b/pkg/docker/Dockerfile.minimal @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>" -ENV UNIT_VERSION 1.16.0-1~buster +ENV UNIT_VERSION 1.17.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.perl5.28 b/pkg/docker/Dockerfile.perl5.28 index f9b596f2..793b48d1 100644 --- a/pkg/docker/Dockerfile.perl5.28 +++ b/pkg/docker/Dockerfile.perl5.28 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>" -ENV UNIT_VERSION 1.16.0-1~buster +ENV UNIT_VERSION 1.17.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.php7.3 b/pkg/docker/Dockerfile.php7.3 index e3c2bfbd..5e3f0e97 100644 --- a/pkg/docker/Dockerfile.php7.3 +++ b/pkg/docker/Dockerfile.php7.3 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>" -ENV UNIT_VERSION 1.16.0-1~buster +ENV UNIT_VERSION 1.17.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.python2.7 b/pkg/docker/Dockerfile.python2.7 index 065fc61b..9e3a431c 100644 --- a/pkg/docker/Dockerfile.python2.7 +++ b/pkg/docker/Dockerfile.python2.7 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>" -ENV UNIT_VERSION 1.16.0-1~buster +ENV UNIT_VERSION 1.17.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.python3.7 b/pkg/docker/Dockerfile.python3.7 index d80d5533..2517896b 100644 --- a/pkg/docker/Dockerfile.python3.7 +++ b/pkg/docker/Dockerfile.python3.7 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>" -ENV UNIT_VERSION 1.16.0-1~buster +ENV UNIT_VERSION 1.17.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.ruby2.5 b/pkg/docker/Dockerfile.ruby2.5 index 3d141335..7258bd28 100644 --- a/pkg/docker/Dockerfile.ruby2.5 +++ b/pkg/docker/Dockerfile.ruby2.5 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>" -ENV UNIT_VERSION 1.16.0-1~buster +ENV UNIT_VERSION 1.17.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Makefile b/pkg/docker/Makefile index d80b8763..7647e51b 100644 --- a/pkg/docker/Makefile +++ b/pkg/docker/Makefile @@ -1,6 +1,7 @@ #!/usr/bin/make include ../../version +include ../shasum.mak DEFAULT_RELEASE := 1 @@ -29,12 +30,16 @@ MODULE_full="unit=$${UNIT_VERSION} unit-php=$${UNIT_VERSION} unit-python2.7=$${U MODULE_minimal="unit=$${UNIT_VERSION}" +EXPORT_DIR := $(VERSION) + default: - @echo "valid targets: all build dockerfiles push clean" + @echo "valid targets: all build dockerfiles push tag export clean" dockerfiles: $(addprefix Dockerfile., $(MODULES)) -build: dockerfiles $(addprefix build-,$(MODULES)) -push: build $(addprefix push-,$(MODULES)) latest +build: $(addprefix build-,$(MODULES)) +tag: $(addprefix tag-,$(MODULES)) +push: $(addprefix push-,$(MODULES)) latest +export: $(addsuffix .tar.gz,$(addprefix $(EXPORT_DIR)/nginx-unit-$(VERSION)-,$(MODULES))) $(addsuffix .tar.gz.sha512, $(addprefix $(EXPORT_DIR)/nginx-unit-$(VERSION)-,$(MODULES))) Dockerfile.%: ../../version @echo "===> Building $@" @@ -46,17 +51,29 @@ Dockerfile.%: ../../version build-%: Dockerfile.% docker build -t unit:$(VERSION)-$* -f Dockerfile.$* . -push-%: +tag-%: build-% docker tag unit:$(VERSION)-$* nginx/unit:$(VERSION)-$* + +push-%: tag-% docker push nginx/unit:$(VERSION)-$* latest: docker tag nginx/unit:$(VERSION)-full nginx/unit:latest docker push nginx/unit:latest +$(EXPORT_DIR): + mkdir -p $@ + +$(EXPORT_DIR)/nginx-unit-$(VERSION)-%.tar.gz: $(EXPORT_DIR) tag-% + docker save nginx/unit:$(VERSION)-$* | gzip > $@ + +$(EXPORT_DIR)/nginx-unit-$(VERSION)-%.tar.gz.sha512: $(EXPORT_DIR)/nginx-unit-$(VERSION)-%.tar.gz + $(SHA512SUM) $< | sed 's,$(EXPORT_DIR)/,,' > $@ + all: $(addprefix Dockerfile., $(MODULES)) clean: rm -f $(addprefix Dockerfile., $(MODULES)) + rm -rf $(EXPORT_DIR) -.PHONY: default all build dockerfiles latest push clean +.PHONY: default all build dockerfiles latest push tag export clean diff --git a/pkg/shasum.mak b/pkg/shasum.mak new file mode 100644 index 00000000..39ec09e6 --- /dev/null +++ b/pkg/shasum.mak @@ -0,0 +1,9 @@ +ifeq ($(shell sha512sum --version >/dev/null 2>&1 || echo FAIL),) +SHA512SUM = sha512sum +else ifeq ($(shell shasum --version >/dev/null 2>&1 || echo FAIL),) +SHA512SUM = shasum -a 512 +else ifeq ($(shell openssl version >/dev/null 2>&1 || echo FAIL),) +SHA512SUM = openssl sha512 +else +SHA512SUM = $(error no SHA-512 tool found!) +endif |