File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ apt-get install --no-install-recommends -y curl git libjemalloc2 libvips && \
1010apt-get install --no-install-recommends -y redis-server sqlite3 && \
1111rm -rf /var/lib/apt/lists /var/cache/apt/archives
1212
13- # Set production environment
14- ARG BUNDLE_GEMFILE="Gemfile.lock "
13+ # This can be overriden to build the Sandbox image
14+ ARG BUNDLE_GEMFILE="Gemfile"
1515
1616ENV RAILS_ENV="production" \
1717 BUNDLE_DEPLOYMENT="1" \
Original file line number Diff line number Diff line change 99 target=" origin/$1 "
1010fi
1111
12- result_info=" bundle exec rubocop --force-exclusion --format simple $( git diff-tree -r --no-commit-id --name-only $target ..HEAD) "
12+ changed_ruby_files=$( git diff-tree -r --no-commit-id --name-only $target ..HEAD | grep ' \.rb$' || :)
13+
14+ if [ -z " $changed_ruby_files " ]
15+ then
16+ echo " ✅ No Ruby files changed compared to $target . Skipping rubocop."
17+ exit 0
18+ fi
19+
20+ result_info=" bundle exec rubocop --force-exclusion --format simple $changed_ruby_files "
1321files_inspected=` $result_info | grep " files inspected\|file inspected" | cut -d " " -f1`
1422warning_count=` $result_info | grep " offenses detected\|offense detected" | cut -d " " -f4`
1523
You can’t perform that action at this time.
0 commit comments