-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to bump framework versions, bump coingecko (#2276)
Co-authored-by: amit-momin <108959691+amit-momin@users.noreply.github.com>
- Loading branch information
1 parent
a2cae21
commit 4972b1f
Showing
8 changed files
with
89 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@chainlink/coingecko-test-adapter': patch | ||
--- | ||
|
||
Bump framework version |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file renamed
BIN
+291 KB
...ework-npm-0.5.1-ecedc1f471-b002289fc5.zip → ...ework-npm-0.5.2-89b5fa8068-4af5f395c4.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
function bump() ( | ||
cd $1 | ||
|
||
# Get current version | ||
current_version=$(jq -r '.dependencies."@chainlink/external-adapter-framework"' package.json) | ||
# Install latest version, pinned | ||
yarn add @chainlink/external-adapter-framework -E > /dev/null # Silence output | ||
latest_version=$(jq -r '.dependencies."@chainlink/external-adapter-framework"' package.json) # Get final version | ||
|
||
if [[ $current_version == $latest_version ]] ; then | ||
echo "Package $1 already at latest version $latest_version" | ||
else | ||
echo "Bumped framework version in package $1 from version $current_version to version $latest_version" | ||
fi | ||
) | ||
|
||
cd packages | ||
|
||
if [[ -z "${NPM_AUTH_TOKEN}" ]]; then | ||
echo "The NPM_AUTH_TOKEN variable needs to be set" | ||
exit 1 | ||
fi | ||
|
||
# This will cause changes to .yarnrc.yml, so we'll need to remove them later | ||
yarn config set npmAuthToken $NPM_AUTH_TOKEN | ||
|
||
if [[ -n "$1" ]]; then | ||
# Run bump only for one package | ||
if jq -e 'if (.dependencies."@chainlink/external-adapter-framework" != null) then true else false end' "sources/${1}/package.json" > /dev/null ; then | ||
echo "Will only bump framework version for package sources/$1" | ||
bump "sources/$1" | ||
else | ||
echo "Package $1 does not exist or use EA v3" | ||
fi | ||
else | ||
echo "Bumping versions for all available source packages and scripts" | ||
bump scripts/ | ||
|
||
for d in sources/* ; do | ||
if [[ $d == "sources/README.md" ]] ; then | ||
continue | ||
fi | ||
|
||
if jq -e 'if (.dependencies."@chainlink/external-adapter-framework" != null) then true else false end' "${d}/package.json" > /dev/null ; then | ||
bump "$d" | ||
fi | ||
done | ||
fi | ||
|
||
cd .. | ||
|
||
# Remove the auth token from .yarnrc to avoid leaking tokens | ||
git restore .yarnrc.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters