react / wstein / node_modules / jest-cli / node_modules / jsdom / node_modules / request / release.sh
80676 views#!/bin/sh12if [ -z "`which github-changes`" ]; then3# specify version because github-changes "is under heavy development. Things4# may break between releases" until 0.1.05echo "First, do: [sudo] npm install -g [email protected]"6exit 17fi89if [ -d .git/refs/remotes/upstream ]; then10remote=upstream11else12remote=origin13fi1415# Increment v2.x.y -> v2.x+1.016npm version minor || exit 11718# Generate changelog from pull requests19github-changes -o request -r request \20--auth --verbose \21--file CHANGELOG.md \22--only-pulls --use-commit-body \23--date-format '(YYYY/MM/DD)' \24|| exit 12526# Since the tag for the new version hasn't been pushed yet, any changes in it27# will be marked as "upcoming"28version="$(grep '"version"' package.json | cut -d'"' -f4)"29sed -i -e "s/^### upcoming/### v$version/" CHANGELOG.md3031# This may fail if no changelog updates32# TODO: would this ever actually happen? handle it better?33git add CHANGELOG.md; git commit -m 'Update changelog'3435# Publish the new version to npm36npm publish || exit 13738# Increment v2.x.0 -> v2.x.139# For rationale, see:40# https://github.com/request/oauth-sign/issues/10#issuecomment-5891701841npm version patch || exit 14243# Push back to the main repo44git push $remote master --tags || exit 1454647