File tree Expand file tree Collapse file tree 4 files changed +61
-16
lines changed Expand file tree Collapse file tree 4 files changed +61
-16
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ validate-shfmt:
42
42
shfmt :
43
43
./hack/shfmt
44
44
45
+ .PHONY : validate-authors
46
+ validate-authors :
47
+ $(BUILDX_CMD ) bake validate-authors
48
+
45
49
.PHONY : validate-generated-files
46
50
validate-generated-files :
47
51
./hack/validate-generated-files
@@ -60,3 +64,7 @@ vendor:
60
64
.PHONY : generated-files
61
65
generated-files :
62
66
./hack/update-generated-files
67
+
68
+ .PHONY : authors
69
+ authors :
70
+ $(BUILDX_CMD ) bake authors
Original file line number Diff line number Diff line change
1
+ variable "ALPINE_VERSION" {
2
+ default = null
3
+ }
4
+
1
5
variable "GO_VERSION" {
2
6
default = null
3
7
}
4
8
5
9
target "_common" {
6
10
args = {
11
+ ALPINE_VERSION = ALPINE_VERSION
7
12
GO_VERSION = GO_VERSION
8
13
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
9
14
}
@@ -20,9 +25,23 @@ target "validate-vendor" {
20
25
output = [" type=cacheonly" ]
21
26
}
22
27
28
+ target "validate-authors" {
29
+ inherits = [" _common" ]
30
+ dockerfile = " ./hack/dockerfiles/authors.Dockerfile"
31
+ target = " validate"
32
+ output = [" type=cacheonly" ]
33
+ }
34
+
23
35
target "vendor" {
24
36
inherits = [" _common" ]
25
37
dockerfile = " ./hack/dockerfiles/vendor.Dockerfile"
26
38
target = " update"
27
39
output = [" ." ]
28
40
}
41
+
42
+ target "authors" {
43
+ inherits = [" _common" ]
44
+ dockerfile = " ./hack/dockerfiles/authors.Dockerfile"
45
+ target = " update"
46
+ output = [" ." ]
47
+ }
Original file line number Diff line number Diff line change
1
+ # syntax=docker/dockerfile-upstream:master
2
+
3
+ ARG ALPINE_VERSION=3.17
4
+
5
+ FROM alpine:${ALPINE_VERSION} AS gen
6
+ RUN apk add --no-cache git
7
+ WORKDIR /src
8
+ RUN --mount=type=bind,target=. <<EOT
9
+ set -e
10
+ mkdir /out
11
+ # see also ".mailmap" for how email addresses and names are deduplicated
12
+ {
13
+ echo "# This file lists all individuals having contributed content to the repository."
14
+ echo "# For how it is generated, see hack/dockerfiles/authors.Dockerfile."
15
+ echo
16
+ git log --format='%aN <%aE>' | LC_ALL=C.UTF-8 sort -uf
17
+ } > /out/AUTHORS
18
+ cat /out/AUTHORS
19
+ EOT
20
+
21
+ FROM scratch AS update
22
+ COPY --from=gen /out /
23
+
24
+ FROM gen AS validate
25
+ RUN --mount=type=bind,target=.,rw <<EOT
26
+ set -e
27
+ git add -A
28
+ cp -rf /out/* .
29
+ if [ -n "$(git status --porcelain -- AUTHORS)" ]; then
30
+ echo >&2 'ERROR: Authors result differs. Please update with "make authors"'
31
+ git status --porcelain -- AUTHORS
32
+ exit 1
33
+ fi
34
+ EOT
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments