Skip to content

Commit

Permalink
fix: Update version scripts (#2274)
Browse files Browse the repository at this point in the history
Recent upgrades to `yarn` and (older) `jq` require updates to the
version management scripts we use to sync Endo with Agoric SDK.
  • Loading branch information
kriskowal committed May 7, 2024
2 parents 1bcc769 + a7668ef commit 1ced8d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/get-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -ueo pipefail
WORKDIR=${1:-.}

cd -- "$WORKDIR"
yarn workspaces --json info --silent |
jq -r '.data | fromjson | .[].location | "\(.)/package.json"' |
npm query .workspace |
jq -r '.[].location | "\(.)/package.json"' |
xargs jq '{key: .name, value: "^\(.version)"}' |
jq --slurp from_entries
4 changes: 2 additions & 2 deletions scripts/set-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ VERSIONSHASH=$(git hash-object -w --stdin)
jq -r '.data | fromjson | .[].location | "\(.)/package.json"' || true
) | while read PACKAGEJSON; do
PACKAGEJSONHASH=$(
jq --argfile versions <(git cat-file blob "$VERSIONSHASH") '
jq --slurpfile versions <(git cat-file blob "$VERSIONSHASH") '
def update(name): if .[name] then {
(name): [
.[name] |
to_entries[] |
{
key: .key,
value: ($versions[.key] // .value)
value: ($versions[0][.key] // .value)
}
] | from_entries
} else {} end;
Expand Down

0 comments on commit 1ced8d8

Please sign in to comment.