summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-04-10 00:02:14 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2021-04-10 00:42:11 +0200
commit31eb54d4563afc14cdbeaa3f7eb40156ce15fcc1 (patch)
tree7eae56289810436a98454f867476ebd3423a4a17
parent2b5c43693476b1ba367be14817d2b5f5ca99b7ee (diff)
Makefile: image: update 'lbl' of newly pushed image
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--Dockerfile2
-rw-r--r--Makefile14
2 files changed, 9 insertions, 7 deletions
diff --git a/Dockerfile b/Dockerfile
index e6a4b9d..b8bd180 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -18,7 +18,7 @@ ARG NGINX_USER="alejandrocolomar"
ARG NGINX_REPO="nginx"
ARG NGINX_REPOSITORY="${NGINX_REG}/${NGINX_USER}/${NGINX_REPO}"
ARG NGINX_LBL="1.16.0"
-ARG NGINX_DIGEST="sha256:34c652cbc41b0c09daab213282ab0af88d4a55dd532a98458e221035bdfa6d0d"
+ARG NGINX_DIGEST="sha256:a70106790923049e88ec5c0d8166270781d5403bf26a2110788af14584242b77"
########################################################################
diff --git a/Makefile b/Makefile
index a8726e5..9b74e28 100644
--- a/Makefile
+++ b/Makefile
@@ -43,9 +43,10 @@ user = $(shell <$(www) grep '^user' | cut -f2)
repo = $(shell <$(www) grep '^repo' | cut -f2)
repository = $(reg)/$(user)/$(repo)
lbl = $(shell <$(www) grep '^lbl' | cut -f2)
-lbl_ = $(shell git describe --tags | sed 's/^v//')_$(arch)
+lbl_ = $(shell git describe --tags | sed 's/^v//')
+lbl_a = $(lbl_)_$(arch)
img = $(repository):$(lbl)
-img_ = $(repository):$(lbl_)
+img_a = $(repository):$(lbl_a)
archs = $(shell <$(CURDIR)/.config grep '^archs' | cut -f2 | tr ',' ' ')
imgs = $(addprefix $(img)_,$(archs))
digest = $(shell <$(www) grep '^digest' | grep $(arch) | cut -f3)
@@ -173,17 +174,18 @@ image: submodules
$(MAKE) image-build arch=$${arch} || exit $$?; \
$(MAKE) image-push arch=$${arch} || exit $$?; \
done;
+ @sed -Ei 's/lbl .*/lbl $(lbl_)/' $(www);
@$(MAKE) image-manifest;
.PHONY: image-build
image-build: Dockerfile
- @echo ' DOCKER image build $(img_)';
- @docker image build -t '$(img_)' $(CURDIR) >/dev/null;
+ @echo ' DOCKER image build $(img_a)';
+ @docker image build -t '$(img_a)' $(CURDIR) >/dev/null;
.PHONY: image-push
image-push:
- @echo ' DOCKER image push $(img_)';
- @docker image push '$(img_)' \
+ @echo ' DOCKER image push $(img_a)';
+ @docker image push '$(img_a)' \
|grep 'digest:' \
|sed -E 's/.*digest: ([^ ]+) .*/\1/' \
|while read d; do \