File: Dockerfile.authors

package info (click to toggle)
docker.io 27.5.1%2Bdfsg4-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 67,452 kB
  • sloc: sh: 5,847; makefile: 1,146; ansic: 664; python: 162; asm: 133
file content (25 lines) | stat: -rw-r--r-- 556 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# syntax=docker/dockerfile:1

ARG ALPINE_VERSION=3.20

FROM alpine:${ALPINE_VERSION} AS gen
RUN apk add --no-cache bash git
WORKDIR /src
RUN --mount=type=bind,target=. \
  mkdir /out && ./scripts/docs/generate-authors.sh /out

FROM scratch AS update
COPY --from=gen /out /

FROM gen AS validate
RUN --mount=type=bind,target=.,rw <<EOT
set -e
git add -A
cp -rf /out/* .
diff=$(git status --porcelain -- AUTHORS)
if [ -n "$diff" ]; then
  echo >&2 'ERROR: Authors result differs. Update with "make -f docker.Makefile authors"'
  echo "$diff"
  exit 1
fi
EOT