Sha256: 59f15c33ed11029a8014ac02ef0ed7d224211c230882db99066eeea1e81ce63c

Contents?: true

Size: 1.04 KB

Versions: 6

Compression:

Stored size: 1.04 KB

Contents

#!/bin/bash

#/ NAME
#/     build-gem -- upload the latest (timestamp) rubygem to rubygems.org
#/
#/ SYNOPSIS
#/     build gem -n gem_name

# figure out the project root under which bin, lib live
shome="$(unset CDPATH; cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"

# load a jason bourne library
source "$shome/libexec/_jason"

# entry point
function main {
  if [[ "$#" = 0 ]]; then
    set -- "$shome/$(basename "$shome").gemspec"
  fi

  cd "$shome"

  for pth_gemspec in "$@"; do
    if [[ -d "$pth_gemspec" ]]; then
      local a
      for a in $(set +f; ls -d $pth_gemspec/*); do
        if [[ -d "$a" ]]; then
          pushd $a > /dev/null
          (set +f; rm -f *.gem)
          (export EDIT_$(basename ${a//-/_})=1; gem build $(basename $(pwd)).gemspec)
          (set +f; mv *.gem $shome/vendor/cache/)
          popd > /dev/null
        fi
      done
    elif [[ -e "$pth_gemspec" ]]; then
  gem build "$pth_gemspec"
    else
      logger_fatal "could not find gemspec $pth_gemspec"
      exit 1
    fi
  done
}

require sub "$BASH_SOURCE" "$@"

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tvd-tvdinner-0.0.27 cookbooks/tvdinner/files/default/jasonx/build-gem
tvd-tvdinner-0.0.26 cookbooks/tvdinner/files/default/jasonx/build-gem
tvd-tvdinner-0.0.25 cookbooks/tvdinner/files/default/jasonx/build-gem
tvd-tvdinner-0.0.24 cookbooks/tvdinner/files/default/jasonx/build-gem
tvd-tvdinner-0.0.23 cookbooks/tvdinner/files/default/jasonx/build-gem
tvd-tvdinner-0.0.22 cookbooks/tvdinner/files/default/jasonx/build-gem