1
1
mirror of https://github.com/primer/css.git synced 2024-12-22 05:31:43 +03:00
css/script/try-publish

13 lines
341 B
Plaintext
Raw Normal View History

#!/bin/bash
set -e
# pwd
2017-07-26 01:39:38 +03:00
package=$(jq -r .name package.json)
version=$(jq -r .version package.json)
2017-07-26 01:18:33 +03:00
published=$(npm info $package@$version version)
if [[ "$version" = "$published" ]]; then
echo "⚠️ $package@$version is already published!"
else
2017-07-26 01:18:33 +03:00
echo "📦 Publishing: $package@$version (published: $published)"
npm publish $@
fi