codeclimate/codeclimate

View on GitHub
bin/release

Summary

Maintainability
Test Coverage
#!/bin/bash
#
# Release a new version of this repository.
#
# Assumes bin/prep-release was run and the PR merged.
#
# Usage: bin/release
#
###
set -e

./bin/validate-release

version=$(< VERSION)

git fetch origin master
git reset --hard origin/master

printf "RELEASE %s\n" "$version"
bundle check || bundle install

printf "############################################################################"
printf "#  The stdout will eventually hang with no message.                        #"
printf "#  It is waiting for RubyGems TFA code input, type it in and hit enter!    #"
printf "############################################################################"
printf "\n\n"
rake release

docker build --rm --tag codeclimate/codeclimate .
docker push codeclimate/codeclimate:latest
docker tag codeclimate/codeclimate "codeclimate/codeclimate:$version"
docker push "codeclimate/codeclimate:$version"

(cd ../homebrew-formulae/ && bin/release "$version")

cat <<EOM
Be sure to update release notes:

  https://github.com/codeclimate/codeclimate/releases/new?tag=v$version

EOM