Skip to content

Commit

Permalink
Merge branch 'main' into julien/052
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Oct 1, 2024
2 parents 972be48 + 5c05d12 commit 73f7fbe
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 3 deletions.
11 changes: 10 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [#4300](https://github.com/ignite/cli/pull/4300) Only panics the module in the most top function level
- [#4327](https://github.com/ignite/cli/pull/4327) Use the TxConfig from simState instead create a new one
- [#4326](https://github.com/ignite/cli/pull/4326) Add `buf.build` version to `ignite version` command
- [#4362](https://github.com/ignite/cli/pull/4362) Scaffold `Makefile`
- [#4289](https://github.com/ignite/cli/pull/4289) Cosmos SDK v0.52 support

### Changes
Expand All @@ -41,15 +42,23 @@
- [#4290](https://github.com/ignite/cli/pull/4290) Remove ignite ics logic from ignite cli (this functionality will be in the `consumer` app)
- [#4295](https://github.com/ignite/cli/pull/4295) Stop scaffolding `pulsar` files
- [#4317](https://github.com/ignite/cli/pull/4317) Remove xchisel dependency
- [#4328](https://github.com/ignite/cli/pull/4328) Send ignite bug report to sentry. Opt out the same way as for usage analytics
- [#4361](https://github.com/ignite/cli/pull/4361) Remove unused `KeyPrefix` method
- [#4376](https://github.com/ignite/cli/pull/4376) Set different chain-id for in place testnet

### Fixes

- [#4000](https://github.com/ignite/cli/pull/4000) Run all dry runners before the wet run in the `xgenny` pkg
- [#4091](https://github.com/ignite/cli/pull/4091) Fix race conditions in the plugin logic
- [#4128](https://github.com/ignite/cli/pull/4128) Check for duplicate proto fields in config

## [`v28.5.3`](https://github.com/ignite/cli/releases/tag/v28.5.3)

### Changes

- [#4372](https://github.com/ignite/cli/pull/4372) Bump Cosmos SDK to `v0.50.10`
- [#4357](https://github.com/ignite/cli/pull/4357) Bump chain dependencies (store, ics, log, etc)
- [#4328](https://github.com/ignite/cli/pull/4328) Send ignite bug report to sentry. Opt out the same way as for usage analytics

## [`v28.5.2`](https://github.com/ignite/cli/releases/tag/v28.5.2)

### Features
Expand Down
4 changes: 3 additions & 1 deletion ignite/cmd/testnet_inplace.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package ignitecmd

import (
"fmt"

"github.com/spf13/cobra"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -121,7 +123,7 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error {
}

args := chain.InPlaceArgs{
NewChainID: chainID,
NewChainID: fmt.Sprintf("local%s", chainID),
NewOperatorAddress: operatorAddress.String(),
AccountsToFund: accounts,
}
Expand Down
109 changes: 109 additions & 0 deletions ignite/templates/app/files/Makefile.plush
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
COMMIT := $(shell git log -1 --format='%H')
APPNAME := <%= AppName %>

# don't override user values
ifeq (,$(VERSION))
VERSION := $(shell git describe --exact-match 2>/dev/null)
# if VERSION is empty, then populate it with branch's name and raw commit hash
ifeq (,$(VERSION))
VERSION := $(BRANCH)-$(COMMIT)
endif
endif

# Update the ldflags with the app, client & server names
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(APPNAME) \
-X github.com/cosmos/cosmos-sdk/version.AppName=$(APPNAME)d \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT)

BUILD_FLAGS := -ldflags '$(ldflags)'

##############
### Test ###
##############

test-unit:
@echo Running unit tests...
@go test -mod=readonly -v -timeout 30m ./...

test-race:
@echo Running unit tests with race condition reporting...
@go test -mod=readonly -v -race -timeout 30m ./...

test-cover:
@echo Running unit tests and creating coverage report...
@go test -mod=readonly -v -timeout 30m -coverprofile=$(COVER_FILE) -covermode=atomic ./...
@go tool cover -html=$(COVER_FILE) -o $(COVER_HTML_FILE)
@rm $(COVER_FILE)

bench:
@echo Running unit tests with benchmarking...
@go test -mod=readonly -v -timeout 30m -bench=. ./...

test: govet govulncheck test-unit

.PHONY: test test-unit test-race test-cover bench

#################
### Install ###
#################

all: install

install:
@echo "--> ensure dependencies have not been modified"
@go mod verify
@echo "--> installing $(APPNAME)d"
@go install $(BUILD_FLAGS) -mod=readonly ./cmd/$(APPNAME)d

.PHONY: all install

##################
### Protobuf ###
##################

# Use this proto-image if you do not want to use Ignite for generating proto files
protoVer=0.15.1
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

proto-gen:
@echo "Generating protobuf files..."
@ignite generate proto-go --yes

.PHONY: proto-gen

#################
### Linting ###
#################

golangci_lint_cmd=golangci-lint
golangci_version=v1.61.0

lint:
@echo "--> Running linter"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@$(golangci_lint_cmd) run ./... --timeout 15m

lint-fix:
@echo "--> Running linter and fixing issues"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@$(golangci_lint_cmd) run ./... --fix --timeout 15m

.PHONY: lint lint-fix

###################
### Development ###
###################

govet:
@echo Running go vet...
@go vet ./...

govulncheck:
@echo Running govulncheck...
@go install golang.org/x/vuln/cmd/govulncheck@latest
@govulncheck ./...

.PHONY: govet govulncheck
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</a>
<img alt="Test Status" src="https://github.com/ignite/cli/workflows/Test/badge.svg" />
<img alt="Lint Status" src="https://github.com/ignite/cli/workflows/Lint/badge.svg" />
<a href="https://discord.gg/ignite-893126937067802685" target="_blank"><img alt="Discord" src="https://img.shields.io/discord/893126937067802685"></a>
<a href="https://discord.com/invite/ignite" target="_blank"><img alt="Discord" src="https://img.shields.io/discord/893126937067802685"></a>
</div>

![Ignite CLI](./assets/ignite-cli.png)
Expand Down

0 comments on commit 73f7fbe

Please sign in to comment.