This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from CircleCI -> local release process (#3054)
- Loading branch information
Showing
3 changed files
with
29 additions
and
8 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
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 |
---|---|---|
@@ -1,10 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd $(dirname $0)/.. | ||
# Publishes TSLint to NPM based on the current version in package.json | ||
# This script must be run with yarn: "yarn run publish:local" | ||
# A user running this script must have Palantir NPM organization credentials | ||
|
||
set -e | ||
|
||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc | ||
chmod 0600 .npmrc | ||
rm -rf tempPublish | ||
mkdir tempPublish | ||
|
||
git clone [email protected]:palantir/tslint.git tempPublish | ||
cd tempPublish | ||
git checkout $npm_package_version | ||
|
||
yarn install --pure-lockfile | ||
yarn run verify | ||
|
||
# courtesy of https://stackoverflow.com/a/3232082/3124288 | ||
read -r -p "Are you sure you want to publish version $npm_package_version? [y/N] " response | ||
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then | ||
yarn publish --tag latest | ||
else | ||
echo "Publishing aborted" | ||
fi | ||
|
||
echo "Publishing..." | ||
npm publish --tag $1 | ||
cd .. | ||
rm -rf tempPublish |