Skip to content

Commit 824126f

Browse files
committed
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 <[email protected]>
1 parent d0643a0 commit 824126f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

schema/generate-schema.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@ else
2020
schematyper=$(which schematyper 2>/dev/null || true)
2121
fi
2222
if test -z "${schematyper}"; then
23-
env GOBIN=${topdir}/bin go install github.com/idubinskiy/schematyper@latest
24-
schematyper=${topdir}/bin/schematyper
23+
if [ ! -d "${topdir}/schematyper" ]; then
24+
git clone https://github.com/idubinskiy/schematyper.git ${topdir}/schematyper
25+
go -C ${topdir}/schematyper mod edit -replace gopkg.in/alecthomas/kingpin.v2=github.com/alecthomas/kingpin/[email protected]
26+
go -C ${topdir}/schematyper mod tidy && go -C ${topdir}/schematyper mod vendor
27+
go -C ${topdir}/schematyper build
28+
fi
29+
schematyper=${topdir}/schematyper/schematyper
2530
fi
2631

2732
${schematyper} \

0 commit comments

Comments
 (0)