Files
angular__angular/scripts/release/enact-release.sh
T
2016-04-06 14:17:34 -07:00

21 lines
473 B
Bash
Executable File

#!/usr/bin/env bash
# `npm whoami` errors and dies if you're not logged in,
# so we redirect the stderr output to /dev/null since we don't care.
NPM_USER=$(npm whoami 2> /dev/null)
if [ "${NPM_USER}" != "angular2-material" ]; then
echo "You must be logged in as 'angular2-material' to publish. Use 'npm login'."
exit
fi
set -ex
for package in ./deploy/*
do
npm publish --access public ${package}
done
# Always log out of npm when publish is complete.
npm logout