Sha256: 66646084c8905c5d8901bbb6dc0728d8c62df02d6180df5f0bcae2ddf800f6f3

Contents?: true

Size: 845 Bytes

Versions: 2

Compression:

Stored size: 845 Bytes

Contents

#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

# Read major/minor/patch argument
version="$1"

# Do a pretend version bump to determine what the new version should be
bumped_version=$(gem bump "$version" --pretend --no-commit | awk '{ print $4 }' | tr -d '[:space:]')

# Use ruby to get the root level directory name
gem_name=$(ruby -e "puts File.basename(Dir.pwd)")

# Update version file
gem bump --version "$bumped_version" --no-commit

# Run bundle install to ensure gem version in Gemfile is updated
bundle install

# Stage Gemfile.lock and the version file
git add Gemfile.lock "lib/$gem_name/version.rb"

# Finally create the bump commit
git commit -m "Bump $gem_name to $bumped_version"

# Create a tag, push the commit and tag, and release to Rubygems
gem bump --version "$bumped_version" --no-commit --tag --push --release

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
stekker_easee-1.0.1 bin/release
stekker_zaptec-1.2.1 bin/release