Sha256: 2f8c5b8e59958970459166337d9b1dcd033b1e90ff73d71eeb58bc3a18bc15cf

Contents?: true

Size: 936 Bytes

Versions: 78

Compression:

Stored size: 936 Bytes

Contents

#!/bin/sh
#
# Open a PR for releasing a new version of this repository.
#
# Usage: bin/prep-release VERSION
#
###
set -e

if [ -z "$1" ]; then
  echo "usage: bin/prep-release VERSION" >&2
  exit 64
fi

version=$1
old_version=$(< VERSION)
branch="release-$version"

if ! bundle exec rake; then
  echo "test failure, not releasing" >&2
  exit 1
fi

printf "RELEASE %s => %s\n" "$old_version" "$version"
git checkout master
git pull

git checkout -b "$branch"

printf "%s\n" "$version" > VERSION
bundle
git add VERSION Gemfile.lock
git commit -m "Release v$version"
git push origin "$branch"

branch_head=$(git rev-parse --short $branch)
if command -v hub > /dev/null 2>&1; then
  hub pull-request -F - <<EOF
Release v$version

https://github.com/codeclimate/codeclimate/compare/v$old_version...$branch_head
EOF
else
  echo "hub not installed? Please open the PR manually" >&2
fi

echo "After merging the version-bump PR, run bin/release"

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
codeclimate-0.49.0 bin/prep-release
codeclimate-0.48.0 bin/prep-release
codeclimate-0.47.0 bin/prep-release
codeclimate-0.46.0 bin/prep-release
codeclimate-0.45.0 bin/prep-release
codeclimate-0.44.0 bin/prep-release
codeclimate-0.43.1 bin/prep-release
codeclimate-0.43.0 bin/prep-release
codeclimate-0.42.1 bin/prep-release
codeclimate-0.42.0 bin/prep-release
codeclimate-0.41.0 bin/prep-release
codeclimate-0.40.3 bin/prep-release
codeclimate-0.40.2 bin/prep-release
codeclimate-0.40.1 bin/prep-release
codeclimate-0.40.0 bin/prep-release
codeclimate-0.39.0 bin/prep-release
codeclimate-0.38.1 bin/prep-release
codeclimate-0.38.0 bin/prep-release
codeclimate-0.37.0 bin/prep-release
codeclimate-0.36.0 bin/prep-release