1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 11:17:05 +03:00
css/script/try-publish

13 lines
306 B
Plaintext
Raw Normal View History

#!/bin/bash
set -e
# pwd
package=$(jq .name package.json)
version=$(jq .version package.json)
published=$(npm info "$package@$version")
if [[ "$version" = "$published" ]]; then
echo "⚠️ $package@$version is already published!"
else
echo "📦 npm publish: $package@$version"
npm publish $@
fi