Files
angular__angular/scripts/release/enact-release.sh
T

21 lines
473 B
Bash
Raw Normal View History

2016-03-15 18:22:16 -07:00
#!/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}
2016-03-15 18:22:16 -07:00
done
# Always log out of npm when publish is complete.
npm logout