Sha256: 64999744a82f6b6b8df1d62e422578ab0bf8b422ec9cfee735fc7cb39fd74743

Contents?: true

Size: 826 Bytes

Versions: 3

Compression:

Stored size: 826 Bytes

Contents

#!/bin/bash

if [ -z "$1" ]; then
  echo "Usage: $0 <version>"
  exit 1
fi

# ~/.gem/credentials
if [ ! -f ~/.gem/credentials ]; then
  echo "Error: ~/.gem/credentials not found. Please set up your RubyGems credentials."
  exit 1
fi

PROJECT_NAME="jisx0208"
GITHUB_REPO="kaibadash/jisx0208-ruby"
VERSION=$1
echo "Start bumping version: $VERSION"

# Publish
# Add release branch
git checkout master
git checkout -b release/$VERSION
sed -i '' "s/VERSION = \".*\"/VERSION = \"$VERSION\"/" lib/$PROJECT_NAME/version.rb

# Publish to rubygems
gem build $PROJECT_NAME.gemspec
bundle install
git commit -am "Bump version $VERSION"
gem push $PROJECT_NAME-$VERSION.gem

# GitHub release
git tag $VERSION
git push --tags
open https://github.com/$GITHUB_REPO/releases/new

# merge to master
git checkout master
git merge release/$VERSION

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jisx0208-0.4.1 bump_new_version.sh
jisx0208-0.4.0 bump_new_version.sh
jisx0208-0.3.0 bump_new_version.sh