Sha256: b46f65547a33cc346e65ebfc4f1feb575e7c3277a31d84a786f7c46558486c6d

Contents?: true

Size: 873 Bytes

Versions: 177

Compression:

Stored size: 873 Bytes

Contents

#!/bin/sh
#/ Usage: release
#/
#/ Tag the version in the repo and push the gem.
#/

set -e
cd $(dirname "$0")/..

[ "$1" = "--help" -o "$1" = "-h" -o "$1" = "help" ] && {
    grep '^#/' <"$0"| cut -c4-
    exit 0
}

gem_name=httparty

# Build a new gem archive.
rm -rf $gem_name-*.gem
gem build -q $gem_name.gemspec

# Make sure we're on the master branch.
(git branch | grep -q '* master') || {
  echo "Only release from the master branch."
  exit 1
}

# Figure out what version we're releasing.
tag=v`ls $gem_name-*.gem | sed "s/^$gem_name-\(.*\)\.gem$/\1/"`

echo "Releasing $tag"

# Make sure we haven't released this version before.
git fetch -t origin

(git tag -l | grep -q "$tag") && {
  echo "Whoops, there's already a '${tag}' tag."
  exit 1
}

# Tag it and bag it.
gem push $gem_name-*.gem && git tag "$tag" &&
  git push origin master && git push origin "$tag"

Version data entries

177 entries across 150 versions & 14 rubygems

Version Path
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
study_line-0.2.7 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
study_line-0.2.6 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
study_line-0.2.5 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
study_line-0.2.4 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
study_line-0.2.3 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
study_line-0.2.2 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
study_line-0.2.1 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
study_line-0.2.0 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/httparty-0.21.0/script/release