Sha256: 140232bade3f7abe7594695aa57badf1cab314da6ba77359f215dc5f852160c2

Contents?: true

Size: 927 Bytes

Versions: 14

Compression:

Stored size: 927 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

./bin/validate-release

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


printf "RELEASE %s => %s\n" "$old_version" "$version"
git fetch origin master
git reset --hard origin/master

git checkout -b "$branch"

printf "%s\n" "$version" > VERSION
make image bundle
git add VERSION Gemfile.lock
git commit --message "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

14 entries across 14 versions & 1 rubygems

Version Path
codeclimate-0.75.0 bin/prep-release
codeclimate-0.74.0 bin/prep-release
codeclimate-0.73.0 bin/prep-release
codeclimate-0.72.0 bin/prep-release
codeclimate-0.71.2 bin/prep-release
codeclimate-0.71.1 bin/prep-release
codeclimate-0.71.0 bin/prep-release
codeclimate-0.70.6 bin/prep-release
codeclimate-0.70.5 bin/prep-release
codeclimate-0.70.4 bin/prep-release
codeclimate-0.70.3 bin/prep-release
codeclimate-0.70.2 bin/prep-release
codeclimate-0.70.1 bin/prep-release
codeclimate-0.70.0 bin/prep-release