-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb8bc99
commit e6e51f1
Showing
4 changed files
with
41 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > .npmrc | ||
|
||
git update-index --assume-unchanged npm-ci-publish.sh | ||
git update-index --assume-unchanged npm-ci-publish-beta-only.sh | ||
|
||
VERSION=$(node -pe 'const version = JSON.parse(process.argv[1]).version; version.includes("beta") || version.includes("alpha") ? version : ""' "$(cat lerna.json)") | ||
|
||
if [ -z "$VERSION" ] | ||
then | ||
echo "cannot publish non-beta/non-alpha version" | ||
else | ||
if [[ "$VERSION" == *"beta"* ]] | ||
then | ||
TAG="next" | ||
echo "version is beta, using --tag $TAG" | ||
elif [[ "$VERSION" == *"alpha"* ]] | ||
then | ||
TAG="alpha" | ||
echo "version is alpha, using --tag $TAG" | ||
fi | ||
npx lerna publish from-package --contents ./ --dist-tag $TAG --yes | ||
fi | ||
|
||
rm .npmrc |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters