diff --git a/.github/workflows/cosmovisor-release.yml b/.github/workflows/cosmovisor-release.yml index 616007814..5405ded49 100644 --- a/.github/workflows/cosmovisor-release.yml +++ b/.github/workflows/cosmovisor-release.yml @@ -34,7 +34,7 @@ jobs: # stick to version v0.179.0(https://github.com/cosmos/cosmos-sdk/issues/11125) version: v0.179.0 args: release --rm-dist --skip-validate - workdir: cosmovisor + workdir: tools/cosmovisor env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GORELEASER_CURRENT_TAG: cosmovisor/${{ env.RELEASE_VERSION }} diff --git a/tools/cosmovisor/CHANGELOG.md b/tools/cosmovisor/CHANGELOG.md index d5e0a9c81..e42494066 100644 --- a/tools/cosmovisor/CHANGELOG.md +++ b/tools/cosmovisor/CHANGELOG.md @@ -36,7 +36,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -## v1.4.0 2022-10-21 +## v1.4.0 2022-10-23 ### API Breaking Changes diff --git a/tools/cosmovisor/cmd/cosmovisor/help.go b/tools/cosmovisor/cmd/cosmovisor/help.go index cc4f38c50..41a873d9f 100644 --- a/tools/cosmovisor/cmd/cosmovisor/help.go +++ b/tools/cosmovisor/cmd/cosmovisor/help.go @@ -18,7 +18,7 @@ the proposal. Cosmovisor interprets that data to perform an update: switch a cur and restart the App. Configuration of Cosmovisor is done through environment variables, which are -documented in: https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md`, +documented in: https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor/README.md`, cosmovisor.EnvName, cosmovisor.EnvHome, ) } diff --git a/tools/cosmovisor/cmd/cosmovisor/help_test.go b/tools/cosmovisor/cmd/cosmovisor/help_test.go index 1b66b226c..4b2075d6f 100644 --- a/tools/cosmovisor/cmd/cosmovisor/help_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/help_test.go @@ -92,7 +92,7 @@ func (s *HelpTestSuite) TestGetHelpText() { expectedPieces := []string{ "Cosmovisor", cosmovisor.EnvName, cosmovisor.EnvHome, - "https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md", + "https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor/README.md", } actual := GetHelpText() diff --git a/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod index 89cb77365..5bb4777b4 100755 --- a/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod +++ b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod @@ -6,7 +6,7 @@ echo 'ERROR: UPGRADE "chain2" NEEDED at height: 49: zip_binary' # create upgrade info # this info contains directly information about binaries (in chain2->chain3 update we test with info containing a link to the file with an address for the new chain binary) -echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:b30cf0b1a3e46ac9587cc4d7b102eb796e39e3e0dfa3f8ca6e163fc1b1e913ca\"}}"}' >$3 +echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:b30cf0b1a3e46ac9587cc4d7b102eb796e39e3e0dfa3f8ca6e163fc1b1e913ca\"}}"}' >$3 sleep 0.1 echo Never should be printed!!! diff --git a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod index 5bc99c552..06520737d 100755 --- a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod +++ b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod @@ -6,8 +6,8 @@ echo Args: $@ echo 'ERROR: UPGRADE "chain3" NEEDED at height: 936: ref_to_chain3-zip_dir.json module=main' # this update info doesn't contain binaries, instead it is a reference for further download instructions. -# echo '{"name":"chain3","height":936,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json\"}}"}' > $3 -echo '{"name":"chain3","height":936,"info":"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json"}' >$3 +# echo '{"name":"chain3","height":936,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json\"}}"}' > $3 +echo '{"name":"chain3","height":936,"info":"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json"}' >$3 sleep 1 echo 'Do not print' diff --git a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip index 68d33a538..92c6486df 100644 Binary files a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip and b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip differ diff --git a/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json b/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json index 7baa216b9..8e18b9a9c 100644 --- a/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json +++ b/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json @@ -1,5 +1,5 @@ { "binaries": { - "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" + "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" } } diff --git a/tools/cosmovisor/upgrade_test.go b/tools/cosmovisor/upgrade_test.go index 7187ce7bd..9bac7b013 100644 --- a/tools/cosmovisor/upgrade_test.go +++ b/tools/cosmovisor/upgrade_test.go @@ -155,7 +155,7 @@ func (s *upgradeTestSuite) TestGetDownloadURL() { }, "follow reference": { info: ref, - url: "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", + url: "https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", }, "malformated reference target": { info: badref,