File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -74,19 +74,11 @@ jobs:
7474 if [ "${VERSION_SPEC}" != "[" ]; then
7575 VERSION_SPEC+=","
7676 fi
77- VERSION_SPEC+="{\"selector\":\"$SELECTOR\""
78-
79- if [ "$SELECTOR" == "latest" ]; then
80- VERSION_SPEC+=",\"tag\":\"$(curl -s https://api.github.com/repos/vercel/next.js/releases/latest | jq -r .tag_name)\""
81- elif [ "$SELECTOR" == "canary" ]; then
82- VERSION_SPEC+=",\"tag\":\"$(curl -s https://api.github.com/repos/vercel/next.js/releases | jq -r '.[] | select(.prerelease == true) | .tag_name' | head -n 1)\""
83- else
84- VERSION_SPEC+=",\"tag\":\"v$SELECTOR\""
85- fi
8677
87- VERSION_SPEC+=",\"version\":\"$(npm view next@$SELECTOR version)\""
78+ VERSION=$(npm view next@$SELECTOR version)
79+ TAG="v$VERSION"
8880
89- VERSION_SPEC+="}"
81+ VERSION_SPEC+="{\"selector\":\"$SELECTOR\",\"tag\":\"$TAG\",\"version\":\"$VERSION\" }"
9082 done
9183 VERSION_SPEC+="]"
9284 echo "version_spec=$VERSION_SPEC" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments