Skip to content
Snippets Groups Projects
Select Git revision
  • 91c7be7df99784ea3135d09c6ccecefee1591270
  • master default protected
  • simple-task/7248-eol-check-add-node-22
  • 6877_check_iml_deployment
4 results

detect-ruby

Blame
  • detect-ruby 694 B
    # ----------------------------------------------------------------------------
    # 
    # EOL - End of life detection - Warn before reaching end of life
    #
    # detect version of ruby
    #
    # ----------------------------------------------------------------------------
    # 2022-02-23  v1.0  <martin.gasser@iml.unibe.ch>
    # ----------------------------------------------------------------------------
    
    # ----- example output
    #   ruby --version
    #   ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
    
    #    rvm list
    #    =* ruby-2.6.3 [ x86_64 ]
    
    #    #=> - current
    #    #=* - current && default
    #    # * - default
    
    
    /usr/local/rvm/bin/rvm list | grep ^= | cut -f 2 -d " " | cut -f 2 -d "-" || ruby --version