santhosh-tekuri / jsonschema

JSONSchema (draft 2020-12, draft 2019-09, draft-7, draft-6, draft-4) Validation using Go
Apache License 2.0
957 stars 98 forks source link

Cannot install older version than `@latest` #175

Closed frostmar closed 5 months ago

frostmar commented 5 months ago

The readme gives this install command, for the latest version: go install github.com/santhosh-tekuri/jsonschema/cmd/jv@latest

The recent v6 release requires a higher golang version, so I wanted to install the last v5 release. However I think it's not possible, due to the submodule in package cmd/jv ?

This happens:

$ go install github.com/santhosh-tekuri/jsonschema/cmd/jv@v5.3.1

go: github.com/santhosh-tekuri/jsonschema/cmd/jv@v5.3.1: github.com/santhosh-tekuri/jsonschema/cmd/jv@v5.3.1: invalid version: unknown revision cmd/jv/v5.3.1
$ go install github.com/santhosh-tekuri/jsonschema/cmd/jv@v5

go: github.com/santhosh-tekuri/jsonschema/cmd/jv@v5: no matching versions for query "v5"
santhosh-tekuri commented 5 months ago

the library and cli are versioned independently

latest version of cli is v0.7.0. You can check it in tags, you will find cmd/jv/v0.7.0

to install previous version try following:

go install github.com/santhosh-tekuri/jsonschema/cmd/jv@v0.6.0
frostmar commented 5 months ago

thanks, it would be helpful to explain that in the readme, with some way to find which versions of the CLI exist

santhosh-tekuri commented 5 months ago

done 89d3b9e