2021-07-01 12:58:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-07-29 14:13:10 +00:00
|
|
|
set -xe
|
|
|
|
|
2021-07-01 12:58:27 +00:00
|
|
|
# Restore all git changes
|
|
|
|
git restore -s@ -SW -- packages examples
|
|
|
|
|
2023-05-15 21:43:12 +00:00
|
|
|
TAG=${1:-latest}
|
|
|
|
|
2021-07-01 12:58:27 +00:00
|
|
|
# Bump versions to edge
|
2022-10-17 10:10:05 +00:00
|
|
|
pnpm jiti ./scripts/bump-edge
|
2021-07-01 12:58:27 +00:00
|
|
|
|
|
|
|
# Update token
|
|
|
|
if [[ ! -z ${NODE_AUTH_TOKEN} ]] ; then
|
|
|
|
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
|
|
|
|
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
|
|
|
|
echo "always-auth=true" >> ~/.npmrc
|
|
|
|
npm whoami
|
|
|
|
fi
|
|
|
|
|
2024-06-16 07:51:12 +00:00
|
|
|
# use absolute urls for better rendering on npm
|
2024-06-16 22:14:09 +00:00
|
|
|
sed -i.bak 's/\.\/\.github\/assets/https:\/\/github.com\/nuxt\/nuxt\/tree\/main\/\.github\/assets/g' README.md
|
2024-06-16 07:51:12 +00:00
|
|
|
|
2021-07-01 12:58:27 +00:00
|
|
|
# Release packages
|
2021-08-11 21:02:01 +00:00
|
|
|
for p in packages/* ; do
|
2023-08-25 15:39:27 +00:00
|
|
|
if [[ $p == "packages/nuxi" ]] ; then
|
|
|
|
continue
|
|
|
|
fi
|
2023-11-06 15:38:45 +00:00
|
|
|
if [[ $p == "packages/test-utils" ]] ; then
|
|
|
|
continue
|
|
|
|
fi
|
2024-05-01 10:08:20 +00:00
|
|
|
if [[ $p == "packages/ui-templates" ]] ; then
|
|
|
|
continue
|
|
|
|
fi
|
2021-07-01 12:58:27 +00:00
|
|
|
pushd $p
|
|
|
|
echo "Publishing $p"
|
2023-01-23 16:53:59 +00:00
|
|
|
cp ../../LICENSE .
|
|
|
|
cp ../../README.md .
|
2023-05-15 21:43:12 +00:00
|
|
|
pnpm publish --access public --no-git-checks --tag $TAG
|
2021-07-01 12:58:27 +00:00
|
|
|
popd
|
|
|
|
done
|
2024-06-16 22:14:09 +00:00
|
|
|
|
|
|
|
mv README.md.bak README.md
|