Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: stop injecting cometbft version #346

Draft
wants to merge 2 commits into
base: fnsad-v050-legacy
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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}}
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'" \
Expand Down
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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) \
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 .

Expand Down Expand Up @@ -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) \
Expand All @@ -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) \
Expand All @@ -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) \
Expand Down
4 changes: 1 addition & 3 deletions networks/local/finschianode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'" \
Expand All @@ -70,4 +68,4 @@ WORKDIR /finschia
EXPOSE 26656 26657
ENTRYPOINT ["/usr/bin/wrapper.sh"]
CMD ["start"]
STOPSIGNAL SIGTERM
STOPSIGNAL SIGTERM
Loading