Skip to content

Commit

Permalink
Replace VERSION with SDK_VERSION (osmosis-labs#6724)
Browse files Browse the repository at this point in the history
  • Loading branch information
niccoloraspa authored Oct 20, 2023
1 parent 7697131 commit 6a28004
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -258,20 +258,20 @@ distclean: clean
### Dependency Updates ###
###############################################################################

VERSION :=
SDK_VERSION :=
MODFILES := ./go.mod ./osmoutils/go.mod ./osmomath/go.mod ./x/epochs/go.mod ./x/ibc-hooks/go.mod ./tests/cl-genesis-positions/go.mod ./tests/cl-go-client/go.mod
# run with VERSION argument specified
# e.g) make update-sdk-version VERSION=v0.45.1-0.20230523200430-193959b898ec
# run with SDK_VERSION argument specified
# e.g) make update-sdk-version SDK_VERSION=v0.45.1-0.20230523200430-193959b898ec
# This will change sdk dependencyu version for go.mod in root directory + all sub-modules in this repo.
update-sdk-version:
@if [ -z "$(VERSION)" ]; then \
echo "VERSION not set"; \
@if [ -z "$(SDK_VERSION)" ]; then \
echo "SDK_VERSION not set"; \
exit 1; \
fi
@echo "Updating version to $(VERSION)"
@echo "Updating version to $(SDK_VERSION)"
@for modfile in $(MODFILES); do \
if [ -e "$$modfile" ]; then \
sed -i '' 's|github.com/osmosis-labs/cosmos-sdk v[0-9a-z.\-]*|github.com/osmosis-labs/cosmos-sdk $(VERSION)|g' $$modfile; \
sed -i '' 's|github.com/osmosis-labs/cosmos-sdk v[0-9a-z.\-]*|github.com/osmosis-labs/cosmos-sdk $(SDK_VERSION)|g' $$modfile; \
cd `dirname $$modfile`; \
go mod tidy; \
cd - > /dev/null; \
Expand Down

0 comments on commit 6a28004

Please sign in to comment.