@@ -184,59 +184,60 @@ jobs:
184
184
set -Eeuo pipefail
185
185
echo "version_tag=$(echo "$version_info" | jq -r '.tag')" >> $GITHUB_OUTPUT
186
186
echo "version_name=$(echo "$version_info" | jq -r '.name')" >> $GITHUB_OUTPUT
187
+ echo "version_info=$version_info"
187
188
188
- # - name: Setup Git and Create Branch
189
- # id: create_branch
190
- # env:
191
- # NEW_BRANCH: "xion/mainnet-release-${{ steps.version_info.outputs.version_tag }}"
192
- # run: |
193
- # set -Eeuo pipefail
189
+ - name : Setup Git and Create Branch
190
+ id : create_branch
191
+ env :
192
+ NEW_BRANCH : " xion/mainnet-release-${{ steps.version_info.outputs.version_tag }}"
193
+ run : |
194
+ set -Eeuo pipefail
194
195
195
- # # Configure git
196
- # git config user.name "github-actions[bot]"
197
- # git config user.email "github-actions[bot]@users.noreply.github.com"
196
+ # Configure git
197
+ git config user.name "github-actions[bot]"
198
+ git config user.email "github-actions[bot]@users.noreply.github.com"
198
199
199
- # # Create/checkout the branch
200
- # if git show-ref --verify --quiet "refs/heads/${NEW_BRANCH}"; then
201
- # echo "Branch $NEW_BRANCH already exists, checking it out"
202
- # git checkout ${NEW_BRANCH}
203
- # else
204
- # echo "Creating new branch $NEW_BRANCH from xion/main"
205
- # git checkout -b $NEW_BRANCH
206
- # fi
207
- # echo "new_branch=$NEW_BRANCH" >> $GITHUB_OUTPUT
200
+ # Create/checkout the branch
201
+ if git show-ref --verify --quiet "refs/heads/${NEW_BRANCH}"; then
202
+ echo "Branch $NEW_BRANCH already exists, checking it out"
203
+ git checkout ${NEW_BRANCH}
204
+ else
205
+ echo "Creating new branch $NEW_BRANCH from xion/main"
206
+ git checkout -b $NEW_BRANCH
207
+ fi
208
+ echo "new_branch=$NEW_BRANCH" >> $GITHUB_OUTPUT
208
209
209
- # - name: Update xion versions.json
210
- # env:
211
- # VERSIONS_FILE: "xion/versions.json"
212
- # VERSION_NAME: ${{ steps.version_info.outputs.version_name }}
213
- # run: |
214
- # set -Eeuo pipefail
210
+ - name : Update xion versions.json
211
+ env :
212
+ VERSIONS_FILE : " xion/versions.json"
213
+ VERSION_NAME : ${{ steps.version_info.outputs.version_name }}
214
+ run : |
215
+ set -Eeuo pipefail
215
216
216
- # # Check if version already exists and update or append
217
- # if jq -e --arg name "$VERSION_NAME" '.versions[] | select(.name == $name)' "$VERSIONS_FILE" > /dev/null; then
218
- # echo "Version $VERSION_NAME already exists, updating..."
219
- # jq --arg name "$VERSION_NAME" --argjson new "$version_info" '
220
- # .versions = (.versions | map(if .name == $name then . + $new else . end))
221
- # ' "$VERSIONS_FILE" > "$VERSIONS_FILE.tmp" && mv "$VERSIONS_FILE.tmp" "$VERSIONS_FILE"
222
- # else
223
- # echo "Version $VERSION_NAME does not exist, appending..."
224
- # jq --arg name "$VERSION_NAME" --argjson new "$version_info" '
225
- # .versions += [$new]
226
- # ' "$VERSIONS_FILE" > "$VERSIONS_FILE.tmp" && mv "$VERSIONS_FILE.tmp" "$VERSIONS_FILE"
227
- # fi
217
+ # Check if version already exists and update or append
218
+ if jq -e --arg name "$VERSION_NAME" '.versions[] | select(.name == $name)' "$VERSIONS_FILE" > /dev/null; then
219
+ echo "Version $VERSION_NAME already exists, updating..."
220
+ jq --arg name "$VERSION_NAME" --argjson new "$version_info" '
221
+ .versions = (.versions | map(if .name == $name then . + $new else . end))
222
+ ' "$VERSIONS_FILE" > "$VERSIONS_FILE.tmp" && mv "$VERSIONS_FILE.tmp" "$VERSIONS_FILE"
223
+ else
224
+ echo "Version $VERSION_NAME does not exist, appending..."
225
+ jq --arg name "$VERSION_NAME" --argjson new "$version_info" '
226
+ .versions += [$new]
227
+ ' "$VERSIONS_FILE" > "$VERSIONS_FILE.tmp" && mv "$VERSIONS_FILE.tmp" "$VERSIONS_FILE"
228
+ fi
228
229
229
- # - name: Update xion chain.json
230
- # env:
231
- # CHAIN_FILE: "xion/chain.json"
232
- # run: |
233
- # set -Eeuo pipefail
230
+ - name : Update xion chain.json
231
+ env :
232
+ CHAIN_FILE : " xion/chain.json"
233
+ run : |
234
+ set -Eeuo pipefail
234
235
235
- # # Update chain.json
236
- # echo "Updating chain.json with new version info"
237
- # jq --argjson new "$version_info" '
238
- # .codebase += ($new | del(.name))
239
- # ' "$CHAIN_FILE" > "$CHAIN_FILE.tmp" && mv "$CHAIN_FILE.tmp" "$CHAIN_FILE"
236
+ # Update chain.json
237
+ echo "Updating chain.json with new version info"
238
+ jq --argjson new "$version_info" '
239
+ .codebase += ($new | del(.name))
240
+ ' "$CHAIN_FILE" > "$CHAIN_FILE.tmp" && mv "$CHAIN_FILE.tmp" "$CHAIN_FILE"
240
241
241
242
# - name: Commit and push changes
242
243
# run: |
0 commit comments