Skip to content

Commit

Permalink
fix: API compatibility check fails in CI pipeline
Browse files Browse the repository at this point in the history
In the master build, we do a version bump which turns `1.146.0` into
`1.146.0-rc.0`, which makes the API compatibility checker try to install
packages with those versions.

Because none of those packages exist, the list of packages ends up
empty, which turns our `npm install $PACKAGES` command into `npm
install`, which subsequently complains that there's no `package.json`.

Strip the `-rc.0` suffix.
  • Loading branch information
rix0rrr committed Feb 21, 2022
1 parent 11d6c69 commit f995581
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/check-api-compatibility.sh
Expand Up @@ -55,6 +55,10 @@ if ! ${SKIP_DOWNLOAD:-false}; then

echo "Determining baseline version..." >&2
version=$(node -p 'require("./scripts/resolve-version.js").version')

# Strip RC suffix if present
version=${version%%-rc.*}

echo " Current version is $version." >&2
echo "Using version '$version' as the baseline..."

Expand All @@ -68,7 +72,8 @@ if ! ${SKIP_DOWNLOAD:-false}; then
mkdir -p $tmpdir

echo "Installing from NPM..." >&2
# use npm7 to automatically install peer dependencies
# Use npm7 instead of whatever the current NPM version is to make sure we
# automatically install peer dependencies
(cd $tmpdir && npx npm@^7.0.0 install --prefix $tmpdir $install_versions)
fi

Expand Down

0 comments on commit f995581

Please sign in to comment.