From ccd01f8ea16fc5ea92dbdb9dbc96968475634016 Mon Sep 17 00:00:00 2001 From: Renata Ravanelli Date: Tue, 28 Jan 2025 12:56:49 -0300 Subject: [PATCH] Fix: Replace go install with local build of schematyper - The repository https://github.com/idubinskiy/schematyper has not seen any commits in 7 years and appears to be unmaintained. Since the package `alecthomas/kingpin` name has changed, fix it and build it locally. This avoids relying on `go install` and allows us to make necessary fixes to the package as needed. Signede off-by: Renata Ravanelli (cherry picked from commit d87064a7edd2f8ef3c138fc7ac7b5b8aa3672196) --- schema/generate-schema.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/schema/generate-schema.sh b/schema/generate-schema.sh index 73b50c7f86..99fcfce189 100755 --- a/schema/generate-schema.sh +++ b/schema/generate-schema.sh @@ -20,8 +20,13 @@ else schematyper=$(which schematyper 2>/dev/null || true) fi if test -z "${schematyper}"; then - env GOBIN=${topdir}/bin go install github.com/idubinskiy/schematyper@latest - schematyper=${topdir}/bin/schematyper + if [ ! -d "${topdir}/schematyper" ]; then + git clone https://github.com/idubinskiy/schematyper.git ${topdir}/schematyper + go -C ${topdir}/schematyper mod edit -replace gopkg.in/alecthomas/kingpin.v2=github.com/alecthomas/kingpin/v2@v2.4.0 + go -C ${topdir}/schematyper mod tidy && go -C ${topdir}/schematyper mod vendor + go -C ${topdir}/schematyper build + fi + schematyper=${topdir}/schematyper/schematyper fi ${schematyper} \