Skip to content

Commit

Permalink
attempt to share constant for go version
Browse files Browse the repository at this point in the history
  • Loading branch information
tbruyelle committed Sep 24, 2024
1 parent d9e73f7 commit 3cd2079
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ jobs:
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set Go version
run: echo "GO_VERSION=$(make required_go_version_full)" >> $GITHUB_ENV

- uses: actions/setup-go@v5
with:
go-version: "1.21.13"
go-version: $GO_VERSION

- name: Set Env
run: echo "TM_VERSION=$(go list -m github.com/cometbft/cometbft | sed 's:.* ::')" >> $GITHUB_ENV
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ TEST_DOCKER_REPO=cosmos/contrib-atomonetest

GO_SYSTEM_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1-2)
REQUIRE_GO_VERSION = 1.21
REQUIRE_GO_VERSION_FULL = 1.21.13

export GO111MODULE = on
export CGO_ENABLED = 0
Expand Down Expand Up @@ -101,6 +102,9 @@ include contrib/devtools/Makefile
### Build ###
###############################################################################

required_go_version_full:
@echo $(REQUIRE_GO_VERSION_FULL)

check_version:
ifneq ($(GO_SYSTEM_VERSION), $(REQUIRE_GO_VERSION))
@echo "ERROR: Go version $(REQUIRE_GO_VERSION) is required for $(VERSION) of AtomOne."
Expand Down

0 comments on commit 3cd2079

Please sign in to comment.