File tree Expand file tree Collapse file tree 4 files changed +30
-3
lines changed Expand file tree Collapse file tree 4 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,12 @@ ADD .htmltest.yml .htmltest.yml
4949RUN htmltest
5050
5151FROM build-base as update-modules
52- ARG MODULE="-u"
53- RUN hugo mod get ${MODULE}
52+ ARG MODULE
53+ RUN if [ -n "$MODULE" ]; then \
54+ hugo mod get ${MODULE}; \
55+ else \
56+ echo "no module set" ; \
57+ fi
5458RUN hugo mod vendor
5559
5660FROM scratch as vendor
Original file line number Diff line number Diff line change 1+ .PHONY : vendor
2+ vendor : # # vendor hugo modules
3+ ./scripts/vendor.sh
Original file line number Diff line number Diff line change @@ -141,10 +141,14 @@ target "aws-cloudfront-update" {
141141 output = [" type=cacheonly" ]
142142}
143143
144+ variable "VENDOR_MODULE" {
145+ default = null
146+ }
147+
144148target "vendor" {
145149 target = " vendor"
146150 args = {
147- MODULE = null
151+ MODULE = VENDOR_MODULE
148152 }
149153 output = [" ." ]
150154}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -eu -o pipefail
4+
5+ output=$( mktemp -d -t hugo-vendor-output.XXXXXXXXXX)
6+
7+ function clean {
8+ rm -rf " $output "
9+ }
10+
11+ trap clean EXIT
12+
13+ docker buildx bake vendor \
14+ " --set=*.output=type=local,dest=${output} "
15+ rm -r _vendor
16+ cp -R $output /* .
You can’t perform that action at this time.
0 commit comments