File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ .PHONY : all
2+ all :
3+
4+ .PHONY : vendor
5+ vendor :
6+ $(eval $@ _TMP_OUT := $(shell mktemp -d -t policy-helpers-output.XXXXXXXXXX) )
7+ docker buildx bake --set " *.output=type=local,dest=$( $@ _TMP_OUT) " vendor
8+ rm -rf ./vendor
9+ cp -R " $( $@ _TMP_OUT) " /* ./
10+ rm -rf " $( $@ _TMP_OUT) " /*
Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ RUN --mount=target=/context \
1515 set -e
1616 rsync -a /context/. .
1717 go mod tidy
18+ go mod vendor
1819 mkdir /out
19- cp -r go.mod go.sum /out
20+ cp -r go.mod go.sum vendor /out
2021EOT
2122
2223FROM scratch AS update
@@ -28,10 +29,11 @@ RUN --mount=target=/context \
2829 set -e
2930 rsync -a /context/. .
3031 git add -A
32+ rm -rf vendor
3133 cp -rf /out/* .
32- if [ -n "$(git status --porcelain -- go.mod go.sum)" ]; then
33- echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor"'
34- git status --porcelain -- go.mod go.sum
34+ if [ -n "$(git status --porcelain -- go.mod go.sum vendor )" ]; then
35+ echo >&2 'ERROR: Vendor result differs. Please vendor your package with "make vendor"'
36+ git status --porcelain -- go.mod go.sum vendor
3537 exit 1
3638 fi
3739EOT
You can’t perform that action at this time.
0 commit comments