Sha256: af115c87d164fe359b19ef90f01ae890fd3bce4fcd3e939c10ffb136004531bd

Contents?: true

Size: 1.02 KB

Versions: 65

Compression:

Stored size: 1.02 KB

Contents

#!/usr/bin/env bash

# Usage
#
# ./prepare-release major|minor|patch [--notes-out <path>] [--tag-out <path>]
#

set -e

if [ -n "$(git status --porcelain)" ]; then
  echo "Working directory is not clean. Aborting."
  exit 1
fi

if [ -z "$GITHUB_TOKEN" ]; then
  echo "GITHUB_TOKEN must be set. Aborting."
  exit 1
fi

# Bump version
# major|minor|patch
part=${1}
if [ "$part" != "patch" ] && [ "$part" != "minor" ] && [ "$part" != "major" ]; then
  echo "'$part' is not a valid option: major|minor|patch"
  exit 1
fi
new_version=$(bump2version --list "$part" | grep new_version | cut -d "=" -f 2)

# Generate Changelog
changelogly --future-release "$new_version"

while [[ "$#" -gt 0 ]]; do
  case $1 in
    # Create release notes artifact
    -n|--notes-out)
      echo "$new_version

      $(
        cat CHANGELOG.md | sed -n "/^## \[$new_version\]/,/^##/p" | sed '$d;1d'
      )" | awk '{$1=$1};1' > $2
      shift
      ;;

    # Create release notes artifact
    -t|--tag-out)
      echo "$new_version" > $2
      ;;
  esac
  shift
done

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
recurly-4.56.0 scripts/prepare-release
recurly-4.55.0 scripts/prepare-release
recurly-4.54.0 scripts/prepare-release
recurly-4.53.0 scripts/prepare-release
recurly-4.52.0 scripts/prepare-release
recurly-4.49.0 scripts/prepare-release
recurly-4.48.1 scripts/prepare-release
recurly-4.48.0 scripts/prepare-release
recurly-4.47.0 scripts/prepare-release
recurly-4.46.0 scripts/prepare-release
recurly-4.45.0 scripts/prepare-release
recurly-4.44.0 scripts/prepare-release
recurly-4.43.0 scripts/prepare-release
recurly-4.42.0 scripts/prepare-release
recurly-4.41.0 scripts/prepare-release
recurly-4.40.0 scripts/prepare-release
recurly-4.39.0 scripts/prepare-release
recurly-4.38.0 scripts/prepare-release
recurly-4.37.0 scripts/prepare-release
recurly-3.28.0 scripts/prepare-release