From 3e5d4b4cb94e23cba7bc3336eef3ac42f9d488bf Mon Sep 17 00:00:00 2001 From: kokeshiM0chi Date: Fri, 15 Mar 2024 21:42:10 +0900 Subject: [PATCH 1/2] fix: fix to reference `FINSCHIA_VERSION` in the env file of fischia-wasm's own repository --- .github/workflows/update-and-rebuild.yaml | 2 +- env | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-and-rebuild.yaml b/.github/workflows/update-and-rebuild.yaml index 2ac5fe06..e5df4d0b 100644 --- a/.github/workflows/update-and-rebuild.yaml +++ b/.github/workflows/update-and-rebuild.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: Set current tag to env run: | - CURRENT_TAG=$(curl "https://api.github.com/repos/Finschia/finschia-proto/tags" | jq -r '.[0].name') + CURRENT_TAG=$(curl https://raw.githubusercontent.com/Finschia/finschia-wasm/main/env | grep FINSCHIA_VERSION | awk -F "=" '{print $2}' ) echo "CURRENT_TAG=$CURRENT_TAG" >> $GITHUB_ENV - name: Check out to finschia diff --git a/env b/env index 15198a47..308c7884 100644 --- a/env +++ b/env @@ -1,3 +1,4 @@ +FINSCHIA_VERSION="v2.0.1" FINSCHIA_SDK_VERSION="v0.48.1" WASMD_VERSION="v0.2.0" OSTRACON_VERSION="v1.1.2" From ddd79862ecaa80550fea7001a6228eb06d3604ad Mon Sep 17 00:00:00 2001 From: kokeshiM0chi Date: Mon, 25 Mar 2024 15:45:39 +0900 Subject: [PATCH 2/2] fix: fix to get tags of finschia go.mod without checkout --- .github/workflows/update-and-rebuild.yaml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/update-and-rebuild.yaml b/.github/workflows/update-and-rebuild.yaml index e5df4d0b..5b92b27f 100644 --- a/.github/workflows/update-and-rebuild.yaml +++ b/.github/workflows/update-and-rebuild.yaml @@ -22,12 +22,6 @@ jobs: CURRENT_TAG=$(curl https://raw.githubusercontent.com/Finschia/finschia-wasm/main/env | grep FINSCHIA_VERSION | awk -F "=" '{print $2}' ) echo "CURRENT_TAG=$CURRENT_TAG" >> $GITHUB_ENV - - name: Check out to finschia - uses: actions/checkout@v4 - with: - repository: Finschia/finschia - fetch-depth: 0 - - name: Check new tag released run: | NEW_TAG=$(curl "https://api.github.com/repos/Finschia/finschia/tags" | jq -r '.[0].name') @@ -41,17 +35,20 @@ jobs: if: env.NEW_TAG id: get_versions run: | - FINSCHIA_SDK_VERSION=$(grep 'github.com/Finschia/finschia-sdk' go.mod | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') - WASMD_VERSION=$(grep 'github.com/Finschia/wasmd' go.mod | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') - IBC_GO_VERSION=$(grep 'github.com/cosmos/ibc-go' go.mod | grep -v '=>' | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') - OSTRACON_VERSION=$(grep 'github.com/Finschia/ostracon' go.mod | grep -v '=>' | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') - TENDERMINT_VERSION=$(grep 'github.com/tendermint/tendermint' go.mod | grep -v '=>' | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') + file_go_mod=$(mktemp temp_go_mod.XXXXXX) + curl -s https://raw.githubusercontent.com/Finschia/finschia/main/go.mod >> ${file_go_mod} + FINSCHIA_SDK_VERSION=$(grep 'github.com/Finschia/finschia-sdk' "${file_go_mod}" | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') + WASMD_VERSION=$(grep 'github.com/Finschia/wasmd' "${file_go_mod}" | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') + OSTRACON_VERSION=$(grep 'github.com/Finschia/ostracon' "${file_go_mod}" | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') + TENDERMINT_VERSION=$(grep 'github.com/tendermint/tendermint' "${file_go_mod}" | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') + IBC_GO_VERSION=$(grep -e 'github.com/cosmos/ibc-go' "${file_go_mod}" | grep -v '=>' | awk '{print $2}' | awk -F '-' '{if ($3 != "") {print $3} else if ($2 != "") {print $1"-"$2} else {print $1}}') echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_OUTPUT echo "FINSCHIA_SDK_VERSION=$FINSCHIA_SDK_VERSION" >> $GITHUB_OUTPUT echo "WASMD_VERSION=$WASMD_VERSION" >> $GITHUB_OUTPUT echo "OSTRACON_VERSION=$OSTRACON_VERSION" >> $GITHUB_OUTPUT echo "TENDERMINT_VERSION=$TENDERMINT_VERSION" >> $GITHUB_OUTPUT echo "IBC_GO_VERSION=$IBC_GO_VERSION" >> $GITHUB_OUTPUT + rm $file_go_mod create-bump-up-PR: runs-on: ubuntu-latest