Sha256: 7e676141ddd94f26805c52b8dffdf5d7575a063bc542d6a583fbcfc42fe3fb7e

Contents?: true

Size: 1.1 KB

Versions: 41

Compression:

Stored size: 1.1 KB

Contents

#!/bin/bash --login
cat Gemfile | awk '{print $2}' | grep -E "^'.+$" | grep -v -e rubygems.org | while read gem; do 
  this_gem=`echo $gem | sed "s/'//g" | sed 's/\,//g'`
  latest_version=`gem search -r $this_gem | grep -E "^${this_gem}\s.+$" | awk '{print $2}' | sed 's/(//g' | sed 's/)//g' | sed 's/,//g'`
  echo "${this_gem} => $latest_version"
  os=`uname -s`
  if [[ $os == 'Linux' ]]; then
    case $this_gem in
      'bundler')
	# sed -i "s/^gem '${this_gem}'.*$/gem '${this_gem}', '>=${latest_version}'/g" Gemfile
	echo 'SKIPPING bundler mutation in Gemfile.';;
      'google-protobuf')
        same_version=`protoc --version | awk '{ print $NF}'`
	sed -i "s/^gem '${this_gem}'.*$/gem '${this_gem}', '${same_version}'/g" Gemfile;;
      *)
	sed -i "s/^gem '${this_gem}'.*$/gem '${this_gem}', '${latest_version}'/g" Gemfile;;
    esac
  elif [[ $os == 'Darwin' ]]; then
    if [[ $this_gem == 'bundler' ]]; then
      sed -i '' "s/^gem '${this_gem}'.*$/gem '${this_gem}', '>=${latest_version}'/g" Gemfile
    else
      sed -i '' "s/^gem '${this_gem}'.*$/gem '${this_gem}', '${latest_version}'/g" Gemfile
    fi
  fi
done

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
meshtastic-0.0.76 upgrade_Gemfile_gems.sh
meshtastic-0.0.75 upgrade_Gemfile_gems.sh
meshtastic-0.0.74 upgrade_Gemfile_gems.sh
meshtastic-0.0.73 upgrade_Gemfile_gems.sh
meshtastic-0.0.72 upgrade_Gemfile_gems.sh
meshtastic-0.0.71 upgrade_Gemfile_gems.sh
meshtastic-0.0.70 upgrade_Gemfile_gems.sh
meshtastic-0.0.69 upgrade_Gemfile_gems.sh
meshtastic-0.0.68 upgrade_Gemfile_gems.sh
meshtastic-0.0.67 upgrade_Gemfile_gems.sh
meshtastic-0.0.42 upgrade_Gemfile_gems.sh
meshtastic-0.0.41 upgrade_Gemfile_gems.sh
meshtastic-0.0.40 upgrade_Gemfile_gems.sh
meshtastic-0.0.39 upgrade_Gemfile_gems.sh
meshtastic-0.0.38 upgrade_Gemfile_gems.sh
meshtastic-0.0.37 upgrade_Gemfile_gems.sh
meshtastic-0.0.36 upgrade_Gemfile_gems.sh
meshtastic-0.0.35 upgrade_Gemfile_gems.sh
meshtastic-0.0.34 upgrade_Gemfile_gems.sh
meshtastic-0.0.33 upgrade_Gemfile_gems.sh