Skip to content
8 changes: 0 additions & 8 deletions script/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ args=$@
event=$TRAVIS_EVENT_TYPE
branch=$TRAVIS_BRANCH

echo "🐛 script/cibuild"
(
echo "TRAVIS_EVENT_TYPE,$TRAVIS_EVENT_TYPE"
echo "TRAVIS_BRANCH,$TRAVIS_BRANCH"
echo "TRAVIS_PULL_REQUEST,$TRAVIS_PULL_REQUEST"
echo "TRAVIS_PULL_REQUEST_BRANCH,$TRAVIS_PULL_REQUEST_BRANCH"
) | column -t -s=,

# the presence of $TRAVIS_PULL_REQUEST_BRANCH tells us
# whether this is a pull request
if [[ "$event" = "pull_request" ]]; then
Expand Down
8 changes: 4 additions & 4 deletions script/try-publish
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash
set -e
# pwd
package=$(jq .name package.json)
version=$(jq .version package.json)
published=$(npm info "$package@$version")
package=$(jq -r .name package.json)
version=$(jq -r .version package.json)
published=$(npm info $package@$version version)
if [[ "$version" = "$published" ]]; then
echo "⚠️ $package@$version is already published!"
else
echo "📦 npm publish: $package@$version"
echo "📦 Publishing: $package@$version (published: $published)"
npm publish $@
fi