Skip to content

Commit

Permalink
feat(ci): go releaser changes
Browse files Browse the repository at this point in the history
Importing the go releaser changes from v3

BREAKING CHANGE: change
  • Loading branch information
praetoriansentry committed Aug 31, 2022
1 parent 0b55d67 commit 5a8995a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
33 changes: 29 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ builds:
- CC=o64-clang
- CXX=o64-clang++
ldflags:
-s -w
- -s -w
- -X "github.com/maticnetwork/polygon-cli/version.Version={{.Version}}"
- -X "github.com/maticnetwork/polygon-cli/version.Commit={{.Commit}}"
- -X "github.com/maticnetwork/polygon-cli/version.Date={{.Date}}"
- -X "github.com/maticnetwork/polygon-cli/version.BuiltBy=goreleaser"
tags:
- netgo

- id: darwin-arm64
main: ./main.go
Expand All @@ -30,7 +36,13 @@ builds:
- CC=oa64-clang
- CXX=oa64-clang++
ldflags:
-s -w
- -s -w
- -X "github.com/maticnetwork/polygon-cli/version.Version={{.Version}}"
- -X "github.com/maticnetwork/polygon-cli/version.Commit={{.Commit}}"
- -X "github.com/maticnetwork/polygon-cli/version.Date={{.Date}}"
- -X "github.com/maticnetwork/polygon-cli/version.BuiltBy=goreleaser"
tags:
- netgo

- id: linux-amd64
main: ./main.go
Expand All @@ -43,7 +55,13 @@ builds:
- CC=gcc
- CXX=g++
ldflags:
-s -w -extldflags "-static"
- -s -w -extldflags "-static"
- -X "github.com/maticnetwork/polygon-cli/version.Version={{.Version}}"
- -X "github.com/maticnetwork/polygon-cli/version.Commit={{.Commit}}"
- -X "github.com/maticnetwork/polygon-cli/version.Date={{.Date}}"
- -X "github.com/maticnetwork/polygon-cli/version.BuiltBy=goreleaser"
tags:
- netgo

- id: linux-arm64
main: ./main.go
Expand All @@ -56,5 +74,12 @@ builds:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
ldflags:
-s -w -extldflags "-static"
- -s -w -extldflags "-static"
- -X "github.com/maticnetwork/polygon-cli/version.Version={{.Version}}"
- -X "github.com/maticnetwork/polygon-cli/version.Commit={{.Commit}}"
- -X "github.com/maticnetwork/polygon-cli/version.Date={{.Date}}"
- -X "github.com/maticnetwork/polygon-cli/version.BuiltBy=goreleaser"
tags:
- netgo


1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -484,3 +484,4 @@ in Yul and Solidity. The workflow for modifying this contract is.
- ~abigen --abi LoadTester.abi --pkg contracts --type LoadTester --bin LoadTester.bin --out loadtester.go~
4. Run the loadtester to enure it deploys and runs sucessfully
- ~go run main.go loadtest --verbosity 700 http://127.0.0.1:8541~

4 changes: 2 additions & 2 deletions cmd/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func renderMonitorUI(ms *monitorStatus) error {
blockTable.ColumnWidths = columnWidths

h0 := widgets.NewParagraph()
h0.Title = "Current Height"
h0.Title = "Current"

h1 := widgets.NewParagraph()
h1.Title = "Gas Price"
Expand Down Expand Up @@ -349,7 +349,7 @@ func renderMonitorUI(ms *monitorStatus) error {
recentBlocks = recentBlocks[len(recentBlocks)-25 : len(recentBlocks)]
}

h0.Text = ms.HeadBlock.String()
h0.Text = fmt.Sprintf("Height: %s\nTime: %s", ms.HeadBlock.String(), time.Now().Format("02 Jan 06 15:04:05 MST"))
gasGwei := new(big.Int)
gasGwei.Div(ms.GasPrice, metrics.UnitShannon)
h1.Text = fmt.Sprintf("%s gwei", gasGwei.String())
Expand Down
7 changes: 6 additions & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
package version

const Version = "0.1.0"
var (
Version = "dev"
Commit = "none"
Date = "unknown"
BuiltBy = "unknown"
)

0 comments on commit 5a8995a

Please sign in to comment.