Sha256: 6533c484f8fb46a6f406912a136322e4023f51fc39427736249e0fc6a8f2f9f3

Contents?: true

Size: 940 Bytes

Versions: 29

Compression:

Stored size: 940 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 ! make test; 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
make Gemfile.lock
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

29 entries across 29 versions & 1 rubygems

Version Path
codeclimate-0.65.0 bin/prep-release
codeclimate-0.64.0 bin/prep-release
codeclimate-0.63.7 bin/prep-release
codeclimate-0.63.6 bin/prep-release
codeclimate-0.63.5 bin/prep-release
codeclimate-0.63.4 bin/prep-release
codeclimate-0.63.3 bin/prep-release
codeclimate-0.63.2 bin/prep-release
codeclimate-0.63.1 bin/prep-release
codeclimate-0.63.0 bin/prep-release
codeclimate-0.62.0 bin/prep-release
codeclimate-0.61.1 bin/prep-release
codeclimate-0.61.0 bin/prep-release
codeclimate-0.60.1 bin/prep-release
codeclimate-0.60.0 bin/prep-release
codeclimate-0.59.1 bin/prep-release
codeclimate-0.59.0 bin/prep-release
codeclimate-0.58.0 bin/prep-release
codeclimate-0.57.0 bin/prep-release
codeclimate-0.56.0 bin/prep-release