Skip to content

Commit 4051d8f

Browse files
committed
chore: move bump logic to scripts
affects: @subsquid/hydra-indexer
1 parent 3fdf239 commit 4051d8f

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/polkadot-bump.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ jobs:
3131
- name: Yarn upgrade
3232
shell: bash
3333
run: |
34-
$(cd ./packages/hydra-indexer && npm upgrade @polkadot/api --latest && rm -rf package-lock.json)
35-
npm dedupe
36-
echo "::set-output name=POLKADOT_API_VERSION::$(cd "./packages/hydra-indexer" && node -p "require('./package.json').dependencies['@polkadot/api']")"
34+
echo "::set-output name=POLKADOT_API_VERSION::$(. ./scripts/bump-polkadot.sh)"
3735
yarn
3836
id: yarn_upgrade
3937

scripts/bump-polkadot.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
cd ./packages/hydra-indexer && npm install @polkadot/api@latest && rm -rf package-json.lock
4+
version="$(node -p "require('./package.json').dependencies['@polkadot/api']")"
5+
echo "${version//^}"

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12544,4 +12544,4 @@ zen-observable-ts@^1.0.0:
1254412544
zen-observable@0.8.15, zen-observable@^0.8.0:
1254512545
version "0.8.15"
1254612546
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15"
12547-
integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==
12547+
integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==

0 commit comments

Comments
 (0)