Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[ci] fix check-transaction-versions #6425

Merged
merged 2 commits into from
Dec 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/ci/gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ check-transaction-versions:
- npm install --ignore-scripts -g @polkadot/metadata-cmp
# Set git config
- git config remote.origin.url "https://github.com/paritytech/polkadot.git"
- git fetch origin release
- export LATEST_RELEASE=$(curl --silent "https://api.github.com/repos/paritytech/polkadot/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
Copy link
Contributor

@joao-paulo-parity joao-paulo-parity Dec 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use jq -e -r '.tag_name' to extract the tag name

also need to use the GITHUB_TOKEN in the Authorization header or the request will be rate-limited and blocked (eventually) by the GitHub API

everything put together:

- export LATEST_RELEASE=$(curl -sSLf -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/paritytech/polkadot/releases/latest" | jq -e -r '.tag_name')

- git fetch origin release-v${LATEST_RELEASE}
script:
- ./scripts/ci/gitlab/check_extrinsics_ordering.sh

Expand Down