mirror of https://github.com/docker/docs.git
hugo: use Go toolchain to update module version
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
a4609c201d
commit
a719c2531f
14
Dockerfile
14
Dockerfile
|
@ -50,11 +50,15 @@ RUN htmltest
|
||||||
|
|
||||||
FROM build-base as update-modules
|
FROM build-base as update-modules
|
||||||
ARG MODULE
|
ARG MODULE
|
||||||
RUN if [ -n "$MODULE" ]; then \
|
RUN <<"EOT"
|
||||||
hugo mod get ${MODULE}; \
|
if [ -n "$MODULE" ]; then
|
||||||
else \
|
go mod edit -dropdreplace ${MODULE/@*/}
|
||||||
echo "no module set"; \
|
hugo mod get ${MODULE}
|
||||||
fi
|
go mod edit -replace ${MODULE/@*/}=${MODULE};
|
||||||
|
else \
|
||||||
|
echo "no module set"; \
|
||||||
|
fi
|
||||||
|
EOT
|
||||||
RUN hugo mod vendor
|
RUN hugo mod vendor
|
||||||
|
|
||||||
FROM scratch as vendor
|
FROM scratch as vendor
|
||||||
|
|
Loading…
Reference in New Issue