diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4e6a020b..3d56e7da 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -44,12 +44,6 @@ jobs: GO_VERSION=$(cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2) echo "GO_VERSION=$GO_VERSION" >> $GITHUB_ENV - - name: Find Ostracon version - id: find_ostracon_version - run: | - CMTVERSION=$(go list -m github.com/cometbft/cometbft | sed 's:.* ::') - echo "CMTVERSION=$CMTVERSION" >> $GITHUB_ENV - - name: Parse tag id: tag run: | @@ -82,7 +76,6 @@ jobs: RUNNER_IMAGE=${{ env.RUNNER_BASE_IMAGE_ALPINE }} GIT_VERSION=${{ env.VERSION }} GIT_COMMIT=${{ github.sha }} - CMTVERSION=${{ env.CMTVERSION }} tags: | ${{ env.DOCKER_REPOSITORY }}:${{ env.VERSION }} labels: ${{steps.meta.outputs.labels}} diff --git a/.goreleaser.yml b/.goreleaser.yml index 36d9ab60..d97977ac 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -28,7 +28,6 @@ builds: - -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} - -X github.com/cosmos/cosmos-sdk/types.DBBackend=goleveldb - -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm - - -X github.com/cometbft/cometbft/version.TMCoreSemVer={{ .Env.CMTVERSION }} - -s -w - -linkmode=external tags: diff --git a/CHANGELOG.md b/CHANGELOG.md index fa298559..c21afcb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Breaking Changes ### Build, CI +* (build) [\#346](https://github.com/Finschia/finschia/pull/346) stop injecting cometbft version ### Docs diff --git a/Dockerfile b/Dockerfile index f2567c38..b403b29a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,6 @@ FROM golang:${GO_VERSION}-alpine3.17 AS build-env ARG FINSCHIA_BUILD_OPTIONS="" ARG GIT_VERSION ARG GIT_COMMIT -ARG CMTVERSION # Set up OS dependencies RUN apk add --no-cache ca-certificates build-base linux-headers curl @@ -48,7 +47,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ -X github.com/cosmos/cosmos-sdk/version.AppName=fnsad \ -X github.com/cosmos/cosmos-sdk/version.Version=${GIT_VERSION} \ -X github.com/cosmos/cosmos-sdk/version.Commit=${GIT_COMMIT} \ - -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(CMTVERSION) \ -X github.com/cosmos/cosmos-sdk/types.DBBackend=goleveldb \ -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc,goleveldb \ -w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \ diff --git a/Makefile b/Makefile index aa40a00f..5945a346 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,6 @@ PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation') PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation') -export CMTVERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') export COMMIT := $(shell git log -1 --format='%H') LEDGER_ENABLED ?= true BINDIR ?= $(GOPATH)/bin @@ -80,7 +79,6 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=finschia \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \ - -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(CMTVERSION) \ -w -s ifeq ($(WITH_CLEVELDB),yes) @@ -157,7 +155,6 @@ build-reproducible: go.sum --build-arg GO_VERSION=$(GO_VERSION) \ --build-arg GIT_VERSION=$(VERSION) \ --build-arg GIT_COMMIT=$(COMMIT) \ - --build-arg CMTVERSION=$(CMTVERSION) \ --build-arg RUNNER_IMAGE=alpine:3.17 \ --platform $(TARGET_PLATFORM) \ -t finschia/finschianode:local-$(ARCH) \ @@ -236,7 +233,6 @@ docker-build: --build-arg RUNNER_IMAGE=$(RUNNER_BASE_IMAGE_ALPINE) \ --build-arg GIT_VERSION=$(VERSION) \ --build-arg GIT_COMMIT=$(COMMIT) \ - --build-arg CMTVERSION=$(CMTVERSION) \ --platform=$(TARGET_PLATFORM) \ -f Dockerfile . .PHONY: docker-build @@ -268,7 +264,6 @@ localnet-docker-build: --build-arg RUNNER_IMAGE=$(RUNNER_BASE_IMAGE_ALPINE) \ --build-arg GIT_VERSION=$(VERSION) \ --build-arg GIT_COMMIT=$(COMMIT) \ - --build-arg CMTVERSION=$(CMTVERSION) \ --platform=$(TARGET_PLATFORM) \ -f networks/local/finschianode/Dockerfile . @@ -311,7 +306,6 @@ release: --platform linux/amd64 \ -e GITHUB_TOKEN=$(GITHUB_TOKEN) \ -e WASMVM_VERSION=$(WASMVM_VERSION) \ - -e CMTVERSION=$(CMTVERSION) \ -v /var/run/docker.sock:/var/run/docker.sock \ -v `pwd`:/go/src/$(PACKAGE_NAME) \ -w /go/src/$(PACKAGE_NAME) \ @@ -329,7 +323,6 @@ release-dry-run: --rm \ --platform linux/amd64 \ -e WASMVM_VERSION=$(WASMVM_VERSION) \ - -e CMTVERSION=$(CMTVERSION) \ -v /var/run/docker.sock:/var/run/docker.sock \ -v `pwd`:/go/src/$(PACKAGE_NAME) \ -w /go/src/$(PACKAGE_NAME) \ @@ -344,7 +337,6 @@ release-snapshot: --rm \ --platform linux/amd64 \ -e WASMVM_VERSION=$(WASMVM_VERSION) \ - -e CMTVERSION=$(CMTVERSION) \ -v /var/run/docker.sock:/var/run/docker.sock \ -v `pwd`:/go/src/$(PACKAGE_NAME) \ -w /go/src/$(PACKAGE_NAME) \ diff --git a/networks/local/finschianode/Dockerfile b/networks/local/finschianode/Dockerfile index 0175b711..5d720f75 100644 --- a/networks/local/finschianode/Dockerfile +++ b/networks/local/finschianode/Dockerfile @@ -12,7 +12,6 @@ FROM golang:${GO_VERSION}-alpine3.17 AS build-env ARG FINSCHIA_BUILD_OPTIONS="" ARG GIT_VERSION ARG GIT_COMMIT -ARG CMTVERSION # Set up OS dependencies RUN apk add --no-cache ca-certificates build-base linux-headers curl @@ -47,7 +46,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ -X github.com/Finschia/finschia-sdk/version.AppName=fnsad \ -X github.com/Finschia/finschia-sdk/version.Version=${GIT_VERSION} \ -X github.com/Finschia/finschia-sdk/version.Commit=${GIT_COMMIT} \ - -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(CMTVERSION) \ -X github.com/Finschia/finschia-sdk/types.DBBackend=goleveldb \ -X github.com/Finschia/finschia-sdk/version.BuildTags=netgo,ledger,muslc,goleveldb \ -w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \ @@ -70,4 +68,4 @@ WORKDIR /finschia EXPOSE 26656 26657 ENTRYPOINT ["/usr/bin/wrapper.sh"] CMD ["start"] -STOPSIGNAL SIGTERM \ No newline at end of file +STOPSIGNAL SIGTERM