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