File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 4
4
# change is that the Hugo version is now an overridable argument rather than a fixed
5
5
# environment variable.
6
6
7
- # Bump this by 1 whenever you change the Dockerfile below, e.g. if
8
- # `DOCKERFFILE_VERSION=1` then change this to `DOCKERFILE_VERSION=2` when you
9
- # change something else in this file.
10
- # DOCKERFILE_VERSION=0
11
-
12
7
FROM alpine:latest
13
8
14
9
LABEL maintainer=
"Luc Perkins <[email protected] >"
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ NETLIFY_FUNC = $(NODE_BIN)/netlify-lambda
6
6
# but this can be overridden when calling make, e.g.
7
7
# CONTAINER_ENGINE=podman make container-image
8
8
CONTAINER_ENGINE ?= docker
9
- DOCKERFILE_VERSION = $(shell grep DOCKERFILE_VERSION Dockerfile | tail -n 1 | cut -d '=' -f 2 | tr -d " \"\n" )
10
- CONTAINER_IMAGE = kubernetes-hugo:v$(HUGO_VERSION ) -$(DOCKERFILE_VERSION )
9
+ IMAGE_VERSION = $(shell scripts/hash-files.sh Dockerfile Makefile | cut -c 1-12 )
10
+ CONTAINER_IMAGE = kubernetes-hugo:v$(HUGO_VERSION ) -$(IMAGE_VERSION )
11
11
CONTAINER_RUN = $(CONTAINER_ENGINE ) run --rm --interactive --tty --volume $(CURDIR ) :/src
12
12
13
13
CCRED =\033[0;31m
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # this script emits as hash for the files listed in $@
3
+ if command -v shasum > /dev/null 2>&1 ; then
4
+ cat " $@ " | shasum -a 256 | cut -d' ' -f1
5
+ elif command -v sha256sum > /dev/null 2>&1 ; then
6
+ cat " $@ " | sha256sum | cut -d' ' -f1
7
+ else
8
+ echo " missing shasum tool" 1>&2
9
+ exit 1
10
+ fi
You can’t perform that action at this time.
0 commit comments