Merge pull request #4927 from strapi/tools/publish-script

tools: Init a simple publish script
This commit is contained in:
Alexandre BODIN 2020-01-10 17:34:44 +01:00 committed by GitHub
commit aff0075bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

24
scripts/publish.sh Executable file
View File

@ -0,0 +1,24 @@
# Force start from root folder
cd "$(dirname "$0")/.."
set -e
version=""
echo "Please enter the version you want to publish"
read version
# publish packages
./node_modules/.bin/lerna publish --no-push --dist-tag beta --exact "$version"
# push master branch
git push origin master
# push tag
git push origin v"$version"
# set latest dist-tag on npm
lerna exec --stream --no-bail --no-private -- npm dist-tag add '${LERNA_PACKAGE_NAME}'@"$version" latest
# run changelog cli
npx @sclt/program-changelog