This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2335 from trufflesuite/distReleaseScript
Internal improvement: Dist tag release script
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 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 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The below tells bash to stop the script if any of the commands fail | ||
set -ex | ||
|
||
distTag=$1 # first arg after yarn publish-dist-tag | ||
currentGitBranch=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [ "${distTag}" == "" ]; | ||
then | ||
echo "No tag name given!" | ||
exit 1 | ||
fi | ||
|
||
echo "Publishing \"truffle@${distTag}\" from \"${currentGitBranch}\" branch." | ||
npm login | ||
node ./scripts/npm-access.js | ||
lerna version --no-git-tag-version --preid $distTag | ||
git add . | ||
git commit -m "Publish truffle@${distTag}" | ||
lerna publish from-package --dist-tag ${distTag} | ||
git push origin $currentGitBranch | ||
npm un -g truffle | ||
npm i -g truffle@${distTag} | ||
echo -e "\\n\\nWoo!" |