2022-03-17 05:37:08 -04:00
|
|
|
# syntax=docker/dockerfile:1
|
2021-12-20 19:44:40 -05:00
|
|
|
|
2024-05-26 05:37:01 -04:00
|
|
|
ARG ALPINE_VERSION=3.20
|
2022-12-04 08:01:30 -05:00
|
|
|
|
|
|
|
FROM alpine:${ALPINE_VERSION} AS gen
|
2021-12-20 19:44:40 -05:00
|
|
|
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
|
2024-04-26 14:16:51 -04:00
|
|
|
echo >&2 'ERROR: Authors result differs. Update with "make -f docker.Makefile authors"'
|
2021-12-20 19:44:40 -05:00
|
|
|
echo "$diff"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
EOT
|