kiteco-public/scripts/publish_npm_pkg.sh
2021-12-31 23:54:19 -08:00

24 lines
455 B
Bash
Executable File

#!/bin/bash
set -e
if [[ -z "$1" ]]; then
echo "no package directory given. using cwd"
else
cd $1
fi
# remove existing assets to ensure a fresh install
rm -rf node_modules/
rm -f package-lock.json
# the below expects solness env variables
npm-login-noninteractive
npm install
# npm install will change package-lock.json -
# we don't care about that as it is not used in npm publish
git checkout -- package-lock.json
npm version minor
npm publish