From 3b62a95ad0d981a59f719b6b2f48184fc12feb49 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 24 Oct 2022 12:55:58 +0200 Subject: [PATCH] ci: fix can't release cosmovisor (#13618) * ci: fix can't release cosmovisor * fix tests * update date * update zip --- .github/workflows/cosmovisor-release.yml | 2 +- tools/cosmovisor/CHANGELOG.md | 2 +- tools/cosmovisor/cmd/cosmovisor/help.go | 2 +- tools/cosmovisor/cmd/cosmovisor/help_test.go | 2 +- .../download/cosmovisor/genesis/bin/autod | 2 +- .../testdata/repo/chain2-zip_bin/autod | 4 ++-- .../testdata/repo/chain2-zip_bin/autod.zip | Bin 562 -> 565 bytes .../testdata/repo/ref_to_chain3-zip_dir.json | 2 +- tools/cosmovisor/upgrade_test.go | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cosmovisor-release.yml b/.github/workflows/cosmovisor-release.yml index 6160078140..5405ded492 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 d5e0a9c81e..e424940665 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 cc4f38c502..41a873d9fd 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 1b66b226cd..4b2075d6fe 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 89cb77365a..5bb4777b43 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 5bc99c5521..06520737da 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 68d33a538c5b54cf0df7344fcea72994610f0159..92c6486df1a362eeebb05c3a2fee9fcb12a13abf 100644 GIT binary patch literal 565 zcmWIWW@Zs#-~hr&3&KMgpkOZ(0|P6A0z+bHNq$Ob2rmP>NmFPt43}1LGcdBeU}j(d z6MHB5XFoO&IQssdNbu4Jx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a9c2 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 7187ce7bd5..9bac7b0134 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,