github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/dockerfiles/Dockerfile.authors (about)

     1  # syntax=docker/dockerfile:1
     2  
     3  ARG ALPINE_VERSION=3.18
     4  
     5  FROM alpine:${ALPINE_VERSION} AS gen
     6  RUN apk add --no-cache bash git
     7  WORKDIR /src
     8  RUN --mount=type=bind,target=. \
     9    mkdir /out && ./scripts/docs/generate-authors.sh /out
    10  
    11  FROM scratch AS update
    12  COPY --from=gen /out /
    13  
    14  FROM gen AS validate
    15  RUN --mount=type=bind,target=.,rw <<EOT
    16  set -e
    17  git add -A
    18  cp -rf /out/* .
    19  diff=$(git status --porcelain -- AUTHORS)
    20  if [ -n "$diff" ]; then
    21    echo >&2 'ERROR: Authors result differs. Please update with "make -f docker.Makefile authors"'
    22    echo "$diff"
    23    exit 1
    24  fi
    25  EOT