Debian Codegraph @

buildkit/hack/dockerfiles/authors.Dockerfile

raw
1 # syntax=docker/dockerfile-upstream:master
2
3 ARG ALPINE_VERSION=3.22
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