mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
Feature/auto releases (#1250)
* refactor: rename project from onsonr/sonr to sonr-io/snrd (#1249) * refactor: rename project from onsonr/sonr to sonr-io/snrd * refactor: update package paths to use sonr-io org --------- Co-authored-by: Prad N <prad@didao.xyz> * feat: introduce devbox for consistent development environment * feat: integrate Doppler for secrets management * feat: streamline release process with Devbox * <no value> * bump: version 0.6.3 → 0.6.4 * feat: enable commit-less version bumping * bump: version 0.6.4 → 0.6.5 * feat: streamline release process and update project metadata * feat: streamline build process and configuration * feat: streamline build process by removing release target * bump: version 0.6.5 → 0.6.6 * feat: upgrade to go 1.24 and align binary name * bump: version 0.6.6 → 0.6.7 * feat: streamline release process and update project metadata * bump: version 0.6.3 → 0.6.4 * feat: streamline development and release processes * feat: streamline development and release processes * refactor: streamline release process with Taskfile * feat: enhance goreleaser output with title for better UX * feat: consolidate release notes * bump: version 0.6.3 → 0.6.4 * feat: streamline release process with improved automation * feat: streamline development and release workflow * bump: version 0.6.3 → 0.6.4 * feat: streamline release process with Taskfile and conventional commits * bump: version 0.6.4 → 0.6.5 * feat: enhance Docker image publishing with piped credentials * chore: remove outdated changelog entries * bump: version 0.6.3 → 0.6.4 * feat: improve release process with interactive feedback * feat: enhance release process with real-time version feedback * bump: version 0.6.4 → 0.6.5 * feat: enhance release process with dynamic version display and streamlined automation * bump: version 0.6.3 → 0.6.4 * refactor: streamline release process by removing redundant version display * bump: version 0.6.4 → 0.6.5 * refactor: streamline release process and simplify dev environment * bump: version 0.6.3 → 0.6.4 * ci: simplify PR checks by removing redundant release validation * refactor: consolidate release workflows for improved maintainability * ci: enhance release workflow for automated version publishing --------- Co-authored-by: Prad N <prad@didao.xyz>
This commit is contained in:
@@ -9,7 +9,6 @@ BINDIR ?= $(GOPATH)/bin
|
||||
SIMAPP = ./app
|
||||
|
||||
# Fetch from env
|
||||
RELEASE_DATE ?= $(shell date +%Y).$(shell date +%V).$(shell date +%u)
|
||||
VERSION ?= $(shell echo $(shell git describe --tags) | sed 's/^v//')
|
||||
COMMIT ?= $(shell git log -1 --format='%H')
|
||||
OS ?= $(shell uname -s)
|
||||
@@ -17,7 +16,7 @@ ROOT ?= $(shell git rev-parse --show-toplevel)
|
||||
|
||||
# for dockerized protobuf tools
|
||||
DOCKER := $(shell which docker)
|
||||
HTTPS_GIT := github.com/onsonr/sonr.git
|
||||
HTTPS_GIT := github.com/sonr-io/snrd.git
|
||||
|
||||
export GO111MODULE = on
|
||||
|
||||
@@ -60,7 +59,7 @@ build_tags_comma_sep := $(subst $(empty),$(comma),$(build_tags))
|
||||
|
||||
# process linker flags
|
||||
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=sonr \
|
||||
-X github.com/cosmos/cosmos-sdk/version.AppName=sonrd \
|
||||
-X github.com/cosmos/cosmos-sdk/version.AppName=snrd \
|
||||
-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)"
|
||||
@@ -84,28 +83,21 @@ ifeq ($(OS),Windows_NT)
|
||||
$(error wasmd server not supported. Use "make build-windows-client" for client)
|
||||
exit 1
|
||||
else
|
||||
go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd ./cmd/sonrd
|
||||
go build -mod=readonly $(BUILD_FLAGS) -o bin/snrd .
|
||||
endif
|
||||
|
||||
build-windows-client: go.sum
|
||||
GOOS=windows GOARCH=amd64 go build -mod=readonly $(BUILD_FLAGS) -o build/sonrd.exe ./cmd/sonrd
|
||||
GOOS=windows GOARCH=amd64 go build -mod=readonly $(BUILD_FLAGS) -o bin/snrd.exe .
|
||||
|
||||
build-contract-tests-hooks:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
go build -mod=readonly $(BUILD_FLAGS) -o build/contract_tests.exe ./cmd/contract_tests
|
||||
go build -mod=readonly $(BUILD_FLAGS) -o bin/contract_tests.exe ./cmd/contract_tests
|
||||
else
|
||||
go build -mod=readonly $(BUILD_FLAGS) -o build/contract_tests ./cmd/contract_tests
|
||||
go build -mod=readonly $(BUILD_FLAGS) -o bin/contract_tests ./cmd/contract_tests
|
||||
endif
|
||||
|
||||
install: go.sum
|
||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
|
||||
|
||||
install-hway: go.sum
|
||||
go install -mod=readonly ./cmd/hway
|
||||
|
||||
release: fmt-date
|
||||
@go install github.com/goreleaser/goreleaser/v2@latest
|
||||
RELEASE_DATE=$(RELEASE_DATE) goreleaser release --clean
|
||||
go install -mod=readonly $(BUILD_FLAGS) .
|
||||
|
||||
########################################
|
||||
### Tools & dependencies
|
||||
@@ -122,14 +114,14 @@ go.sum: go.mod
|
||||
draw-deps:
|
||||
@# requires brew install graphviz or apt-get install graphviz
|
||||
go install github.com/RobotsAndPencils/goviz@latest
|
||||
@goviz -i ./cmd/sonrd -d 2 | dot -Tpng -o dependency-graph.png
|
||||
@goviz -i . -d 2 | dot -Tpng -o dependency-graph.png
|
||||
|
||||
clean:
|
||||
rm -rf .aider*
|
||||
rm -rf static
|
||||
rm -rf .out
|
||||
rm -rf hway.db
|
||||
rm -rf snapcraft-local.yaml build/
|
||||
rm -rf snapcraft-local.yaml bin/
|
||||
rm -rf build
|
||||
|
||||
distclean: clean
|
||||
@@ -242,7 +234,7 @@ local-image:
|
||||
ifeq (,$(shell which heighliner))
|
||||
echo 'heighliner' binary not found. Consider running `make get-heighliner`
|
||||
else
|
||||
heighliner build -c sonrd --local -f chains.yaml
|
||||
heighliner build -c snrd --local -f chains.yaml
|
||||
endif
|
||||
|
||||
.PHONY: get-heighliner local-image is-localic-installed
|
||||
@@ -287,14 +279,14 @@ setup-testnet: mod-tidy is-localic-installed install local-image set-testnet-con
|
||||
# Run this before testnet keys are added
|
||||
# chainid-1 is used in the testnet.json
|
||||
set-testnet-configs:
|
||||
sonrd config set client chain-id sonr-testnet-1
|
||||
sonrd config set client keyring-backend test
|
||||
sonrd config set client output text
|
||||
snrd config set client chain-id sonr-testnet-1
|
||||
snrd config set client keyring-backend test
|
||||
snrd config set client output text
|
||||
|
||||
# import keys from testnet.json into test keyring
|
||||
setup-testnet-keys:
|
||||
-`echo "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" | sonrd keys add acc0 --recover`
|
||||
-`echo "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise" | sonrd keys add acc1 --recover`
|
||||
-`echo "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" | snrd keys add acc0 --recover`
|
||||
-`echo "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise" | snrd keys add acc1 --recover`
|
||||
|
||||
# default testnet is with IBC
|
||||
testnet: setup-testnet
|
||||
@@ -311,49 +303,22 @@ sh-testnet: mod-tidy
|
||||
###############################################################################
|
||||
### extra utils ###
|
||||
###############################################################################
|
||||
|
||||
can-release:
|
||||
@echo "Checking if we can release..."
|
||||
@git diff --exit-code
|
||||
@git diff --cached --exit-code
|
||||
@git tag -l | grep -q -F $(VERSION)
|
||||
@test -z "$$(git ls-files --exclude-standard --others)" || (echo "There are uncommitted files. Please commit or stash them before release."; exit 1)
|
||||
|
||||
should-release:
|
||||
@echo "Checking if we should release..."
|
||||
@git diff --exit-code
|
||||
@git diff --cached --exit-code
|
||||
@git tag -l | grep -q -F $(VERSION)
|
||||
@test -z "$$(git ls-files --exclude-standard --others)" || (echo "There are uncommitted files. Please commit or stash them before release."; exit 1)
|
||||
|
||||
push-docker:
|
||||
@docker build -t ghcr.io/onsonr/sonr:latest .
|
||||
@docker tag ghcr.io/onsonr/sonr:latest ghcr.io/onsonr/sonr:$(VERSION)
|
||||
@docker push ghcr.io/onsonr/sonr:latest
|
||||
@docker push ghcr.io/onsonr/sonr:$(VERSION)
|
||||
|
||||
status:
|
||||
@gh run ls -L 3
|
||||
@gum format -- "# Sonr ($OS-$VERSION)" "- ($(COMMIT)) $ROOT" "- $(RELEASE_DATE)"
|
||||
@sleep 3
|
||||
|
||||
push-docker:
|
||||
push-docker:
|
||||
@docker build -t ghcr.io/onsonr/sonr:$(VERSION) .
|
||||
@docker tag ghcr.io/onsonr/sonr:$(VERSION) ghcr.io/onsonr/sonr:latest
|
||||
@docker push ghcr.io/onsonr/sonr:$(VERSION)
|
||||
@docker push ghcr.io/onsonr/sonr:latest
|
||||
|
||||
release:
|
||||
@RELEASE_DATE=$(RELEASE_DATE) goreleaser release --clean
|
||||
@devbox run cz:bump
|
||||
|
||||
release-dry:
|
||||
@RELEASE_DATE=$(RELEASE_DATE) goreleaser release --snapshot --clean --skip=publish
|
||||
|
||||
release-check:
|
||||
@RELEASE_DATE=$(RELEASE_DATE) goreleaser check
|
||||
|
||||
validate-tag:
|
||||
@sh ./scripts/validate_tag.sh
|
||||
@devbox run release:dry
|
||||
|
||||
deploy-deps:
|
||||
@echo "Installing deploy dependencies"
|
||||
|
||||
Reference in New Issue
Block a user