Skip to content

Commit

Permalink
test go install
Browse files Browse the repository at this point in the history
  • Loading branch information
v-homsi committed Sep 20, 2022
1 parent f34bb25 commit dc14095
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 38 deletions.
52 changes: 26 additions & 26 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
before:
hooks:
- go mod download
- go mod download

builds:
- id: "evmosd-darwin"
main: ./cmd/evmosd
main: ./
binary: bin/evmosd
env:
- CGO_ENABLED=1
Expand All @@ -15,11 +15,11 @@ builds:
goarch:
- amd64
flags:
- -tags=cgo
- -tags=cgo
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=evmos -X github.com/cosmos/cosmos-sdk/version.AppName=evmosd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "evmosd-darwin-arm64"
main: ./cmd/evmosd
main: ./
binary: bin/evmosd
env:
- CGO_ENABLED=1
Expand All @@ -34,7 +34,7 @@ builds:
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=evmos -X github.com/cosmos/cosmos-sdk/version.AppName=evmosd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "evmosd-linux"
main: ./cmd/evmosd
main: ./
binary: bin/evmosd
env:
- CGO_ENABLED=1
Expand All @@ -49,7 +49,7 @@ builds:
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=evmos -X github.com/cosmos/cosmos-sdk/version.AppName=evmosd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "evmosd-linux-arm64"
main: ./cmd/evmosd
main: ./
binary: bin/evmosd
env:
- CGO_ENABLED=1
Expand All @@ -64,7 +64,7 @@ builds:
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=evmos -X github.com/cosmos/cosmos-sdk/version.AppName=evmosd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "evmosd-windows"
main: ./cmd/evmosd
main: ./
binary: bin/evmosd
env:
- CGO_ENABLED=1
Expand All @@ -81,29 +81,29 @@ builds:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=evmos -X github.com/cosmos/cosmos-sdk/version.AppName=evmosd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}

archives:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
format_overrides:
- goos: windows
format: zip
builds:
- evmosd-darwin
- evmosd-darwin-arm64
- evmosd-windows
- evmosd-linux
- evmosd-linux-arm64
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
format_overrides:
- goos: windows
format: zip
builds:
- evmosd-darwin
- evmosd-darwin-arm64
- evmosd-windows
- evmosd-linux
- evmosd-linux-arm64

checksum:
name_template: 'checksums.txt'
name_template: "checksums.txt"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"
snapshot:
name_template: "{{ .Tag }}-next"
4 changes: 3 additions & 1 deletion cmd/evmosd/cmd_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main_test
package evmosd_test

import (
"fmt"
Expand All @@ -10,7 +10,9 @@ import (
"github.com/stretchr/testify/require"

"github.com/evmos/evmos/v9/app"

evmosd "github.com/evmos/evmos/v9/cmd/evmosd"

)

func TestInitCmd(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/evmosd/genaccounts.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package evmosd

import (
"bufio"
Expand Down
2 changes: 1 addition & 1 deletion cmd/evmosd/init.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package evmosd

import (
"bufio"
Expand Down
2 changes: 1 addition & 1 deletion cmd/evmosd/migrate.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package evmosd

import (
"encoding/json"
Expand Down
9 changes: 4 additions & 5 deletions cmd/evmosd/root.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package evmosd

import (
"errors"
Expand All @@ -12,10 +12,6 @@ import (
"github.com/spf13/cast"
"github.com/spf13/cobra"

tmcli "github.com/tendermint/tendermint/libs/cli"
"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/config"
Expand All @@ -37,6 +33,9 @@ import (
servercfg "github.com/evmos/ethermint/server/config"
srvflags "github.com/evmos/ethermint/server/flags"
tmcfg "github.com/tendermint/tendermint/config"
tmcli "github.com/tendermint/tendermint/libs/cli"
"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"

"github.com/evmos/evmos/v9/app"
cmdcfg "github.com/evmos/evmos/v9/cmd/config"
Expand Down
2 changes: 1 addition & 1 deletion cmd/evmosd/testnet.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package evmosd

// DONTCOVER

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/evmos/evmos/v9
module github.com/evmos/evmos/v20

go 1.18

Expand Down
4 changes: 3 additions & 1 deletion cmd/evmosd/main.go → main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ import (

"github.com/evmos/evmos/v9/app"
cmdcfg "github.com/evmos/evmos/v9/cmd/config"

cmd "github.com/evmos/evmos/v9/cmd/evmosd"
)

func main() {
setupConfig()
cmdcfg.RegisterDenoms()

rootCmd, _ := NewRootCmd()
rootCmd, _ := cmd.NewRootCmd()

if err := svrcmd.Execute(rootCmd, "evmosd", app.DefaultNodeHome); err != nil {
switch e := err.(type) {
Expand Down

0 comments on commit dc14095

Please sign in to comment.