Skip to content

Commit

Permalink
ci: don't use next's github releases as source of most recent stable/…
Browse files Browse the repository at this point in the history
…canary versions (#2686)
  • Loading branch information
pieh authored Oct 21, 2024
1 parent eea9520 commit dff9c33
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,11 @@ jobs:
if [ "${VERSION_SPEC}" != "[" ]; then
VERSION_SPEC+=","
fi
VERSION_SPEC+="{\"selector\":\"$SELECTOR\""
if [ "$SELECTOR" == "latest" ]; then
VERSION_SPEC+=",\"tag\":\"$(curl -s https://api.github.com/repos/vercel/next.js/releases/latest | jq -r .tag_name)\""
elif [ "$SELECTOR" == "canary" ]; then
VERSION_SPEC+=",\"tag\":\"$(curl -s https://api.github.com/repos/vercel/next.js/releases | jq -r '.[] | select(.prerelease == true) | .tag_name' | head -n 1)\""
else
VERSION_SPEC+=",\"tag\":\"v$SELECTOR\""
fi
VERSION_SPEC+=",\"version\":\"$(npm view next@$SELECTOR version)\""
VERSION=$(npm view next@$SELECTOR version)
TAG="v$VERSION"
VERSION_SPEC+="}"
VERSION_SPEC+="{\"selector\":\"$SELECTOR\",\"tag\":\"$TAG\",\"version\":\"$VERSION\"}"
done
VERSION_SPEC+="]"
echo "version_spec=$VERSION_SPEC" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit dff9c33

Please sign in to comment.