feat: Improve getSDKVersion() to handle module replacements (#17096)
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
parent
c74e2887b0
commit
b0acf60e6c
@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
* (x/group, x/gov) [#17109](https://github.com/cosmos/cosmos-sdk/pull/17109) Let proposal summary be 40x longer than metadata limit.
|
||||
* (all) [#16537](https://github.com/cosmos/cosmos-sdk/pull/16537) Properly propagated `fmt.Errorf` errors and using `errors.New` where appropriate.
|
||||
* (version) [#17096](https://github.com/cosmos/cosmos-sdk/pull/17096) Improve `getSDKVersion()` to handle module replacements
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
||||
@ -44,7 +44,11 @@ func getSDKVersion() string {
|
||||
var sdkVersion string
|
||||
for _, dep := range deps.Deps {
|
||||
if dep.Path == "github.com/cosmos/cosmos-sdk" {
|
||||
sdkVersion = dep.Version
|
||||
if dep.Replace != nil && dep.Replace.Version != "(devel)" {
|
||||
sdkVersion = dep.Replace.Version
|
||||
} else {
|
||||
sdkVersion = dep.Version
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user