Skip to content

Commit

Permalink
Fix: Replace go install with local build of schematyper
Browse files Browse the repository at this point in the history
- 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]>

(cherry picked from commit d87064a)
  • Loading branch information
ravanelli committed Feb 3, 2025
1 parent a62de1f commit ccd01f8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions schema/generate-schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
go -C ${topdir}/schematyper mod tidy && go -C ${topdir}/schematyper mod vendor
go -C ${topdir}/schematyper build
fi
schematyper=${topdir}/schematyper/schematyper
fi

${schematyper} \
Expand Down

0 comments on commit ccd01f8

Please sign in to comment.