Skip to content

Commit

Permalink
prepare v6 release (#634)
Browse files Browse the repository at this point in the history
* update go version

* enforce libwasm version

* bump spm dep

* pull always
  • Loading branch information
jhernandezb authored Jun 30, 2022
1 parent e3eeed3 commit b8294bc
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ steps:
environment:
GOPROXY: http://goproxy
- name: build
image: golang:1.18.1-alpine3.15
image: golang:1.18.3-alpine3.15
volumes:
- name: cache
path: /go
Expand Down Expand Up @@ -80,7 +80,7 @@ steps:
event:
- push
branch:
- feature/bump-sdk-version
- feature/prepare-release
- name: docker_release
image: plugins/docker:18
settings:
Expand All @@ -96,7 +96,7 @@ steps:
- tag

- name: release
image: golang:1.18.0
image: golang:1.18.3
environment:
GITHUB_TOKEN:
from_secret: github_token
Expand Down Expand Up @@ -315,7 +315,7 @@ steps:
commands:
- ./scripts/ci/upgrade/proposal.sh
- name: stargaze-upgraded
pull: true
pull: always
image: publicawesome/stargaze:v6-beta
commands:
- ./scripts/ci/upgrade/run-upgrade.sh
Expand Down Expand Up @@ -365,6 +365,6 @@ depends_on:
- ibc-integration-test
---
kind: signature
hmac: dd858d75cb427a760fa37eade8bee8b4741ddfa0a443abf8c207ea9c7e0bf32d
hmac: 7ece5972e07d15f4b4f8e80316b63927d495a175704a764119ad91c8a07824d2

...
41 changes: 41 additions & 0 deletions cmd/starsd/cmd/start.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package cmd

import (
"fmt"

"github.com/CosmWasm/wasmd/x/wasm"
wasmvmapi "github.com/CosmWasm/wasmvm/api"
"github.com/spf13/cobra"
)

var LibwasmVersion = "1.0.0"

func CheckLibwasmVersion(cmd *cobra.Command, args []string) error {
version, err := wasmvmapi.LibwasmvmVersion()
if err != nil {
return fmt.Errorf("unable to retrieve libwasmversion %w", err)
}
if version != LibwasmVersion {
return fmt.Errorf("libwasmversion mismatch. got: %s; expected: %s", version, LibwasmVersion)
}
return nil
}
func CustomStart(startCmd *cobra.Command) {
wasm.AddModuleInitFlags(startCmd)
startCmd.PreRunE = chainPreRuns(CheckLibwasmVersion, startCmd.PreRunE)
}

type preRunFn func(cmd *cobra.Command, args []string) error

func chainPreRuns(pfns ...preRunFn) preRunFn {
return func(cmd *cobra.Command, args []string) error {
for _, pfn := range pfns {
if pfn != nil {
if err := pfn(cmd, args); err != nil {
return err
}
}
}
return nil
}
}
6 changes: 1 addition & 5 deletions cmd/starsd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ package main
import (
"os"

"github.com/CosmWasm/wasmd/x/wasm"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
"github.com/public-awesome/stargaze/v6/app"
"github.com/public-awesome/stargaze/v6/cmd/starsd/cmd"
"github.com/spf13/cobra"
"github.com/tendermint/spm/cosmoscmd"
)

Expand All @@ -22,9 +20,7 @@ func main() {
cosmoscmd.AddSubCmd(cmd.TestnetCmd(app.ModuleBasics)),
cosmoscmd.AddCustomInitCmd(cmd.InitCmd(app.ModuleBasics, app.DefaultNodeHome)),
cosmoscmd.AddSubCmd(cmd.PrepareGenesisCmd(app.DefaultNodeHome, app.ModuleBasics)),
cosmoscmd.CustomizeStartCmd(func(startCmd *cobra.Command) {
wasm.AddModuleInitFlags(startCmd)
}),
cosmoscmd.CustomizeStartCmd(cmd.CustomStart),
cosmoscmd.AddSubCmd(cmd.AddGenesisWasmMsgCmd(app.DefaultNodeHome)),
// this line is used by starport scaffolding # root/arguments
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,6 @@ replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/tendermint/spm => github.com/public-awesome/spm v0.1.9-stargaze.0.20220622024829-852372d3599e
github.com/tendermint/spm => github.com/public-awesome/spm v0.1.9-stargaze.0.20220630053558-c96052c2bdb9
google.golang.org/grpc => google.golang.org/grpc v1.33.2
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -840,8 +840,8 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/public-awesome/spm v0.1.9-stargaze.0.20220622024829-852372d3599e h1:0X+WAefJTLIC/zyKYE8amzXu2KthP6Mqb8jXnbQZUak=
github.com/public-awesome/spm v0.1.9-stargaze.0.20220622024829-852372d3599e/go.mod h1:Mge6q3CPCJPOPMOzmy0C/Piq6CujbYC/qrTS25STB0M=
github.com/public-awesome/spm v0.1.9-stargaze.0.20220630053558-c96052c2bdb9 h1:vEtHt6YwEXU0nbeOCX9cIoBUbuCxBLunt/YBW7j2p40=
github.com/public-awesome/spm v0.1.9-stargaze.0.20220630053558-c96052c2bdb9/go.mod h1:I41jlLlB7+iYaz+Kq3Jg3VpG1uwIOlBliFUqxVD+G9s=
github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
Expand Down

0 comments on commit b8294bc

Please sign in to comment.