Skip to content

Update rubocop rspec #63

Update rubocop rspec

Update rubocop rspec #63

Workflow file for this run

name: Check if the gem exists on rubygems.org
on: [pull_request]
jobs:
build-gem:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
ruby-version: ['2.5', '2.7', '3.1', '3.2']
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Check if gem exists
run: |
GEM_VERSION=$(ruby -e "require 'scc/codestyle'; print Scc::Codestyle::VERSION" -I lib)
# if we install the gem, then the $GEM_VERSION already exist on rubygems.org
# therefore error
gem install -q --silent scc-codestyle -v $GEM_VERSION && (touch failed-install && exit 0) || exit 0
test -f failed-install && (echo "bump the gem version!" && exit 1)