Files
buildkit/hack/update-generated-files
T
Tonis Tiigi cfb73e5007 hack: avoid updating generated proto version
This can be done as a separate change when needed.
Also should analyze if this would affect the gogo
incompatibility issues with newer proto.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 21:11:27 -07:00

21 lines
552 B
Bash
Executable File

#!/usr/bin/env bash
. $(dirname $0)/util
set -eu
gogo_version=$(awk '$1 == "github.com/gogo/protobuf" { print $2 }' go.mod)
# protobuf_version=$(awk '$3 == "github.com/golang/protobuf" { print $4 }' go.mod)
output=$(mktemp -d -t buildctl-output.XXXXXXXXXX)
buildxCmd build \
--target "update" \
--build-arg "GOGO_VERSION=$gogo_version" \
--output "type=local,dest=$output" \
--file "./hack/dockerfiles/generated-files.Dockerfile" \
.
# --build-arg "PROTOBUF_VERSION=$protobuf_version" \
cp -R "$output/generated-files/" .
rm -rf $output