Sha256: 6faa4f6555adab005551c9a54a52b71b89c152efef8f931cb9b5fcfefd98cdf5

Contents?: true

Size: 884 Bytes

Versions: 1

Compression:

Stored size: 884 Bytes

Contents

#!/bin/bash

# get the version number from lib/twtxt/version.rb
VERSION=$(cat lib/twtxt/version.rb | grep VERSION | awk '{ print $3 }' | tr -d '"')

# prompt for confirmation and new version number
read -p "Are you sure you want to release version $VERSION? [y/n]: " CONFIRM
if [ "$CONFIRM" == "n" ]; then
    echo "Aborting release process."
    exit 1
fi

read -p "Enter new version number (leave blank to keep $VERSION): " NEW_VERSION
if [ -n "$NEW_VERSION" ]; then
    echo "Updating version number to $NEW_VERSION."
    sed -i '' "s/VERSION = \"$VERSION\"/VERSION = \"$NEW_VERSION\"/" lib/twtxt/version.rb
    VERSION=$NEW_VERSION
fi

# build the gem
echo "Building gem..."
gem build twtxt.gemspec

# push the gem to RubyGems
read -p "Push gem to RubyGems? [y/n]: " PUSH_GEM
if [ "$PUSH_GEM" == "y" ]; then
    echo "Pushing gem to RubyGems..."
    gem push twtxt-$VERSION.gem
fi

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twtxt-0.0.1 deploy.sh