Skip to content

Commit 8d7ff03

Browse files
authored
Merge branch 'develop' into welcome/kits
2 parents 9e60986 + 43b7489 commit 8d7ff03

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ apt-get install --no-install-recommends -y curl git libjemalloc2 libvips && \
1010
apt-get install --no-install-recommends -y redis-server sqlite3 && \
1111
rm -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

1616
ENV RAILS_ENV="production" \
1717
BUNDLE_DEPLOYMENT="1" \

bin/rubocop-ci

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ else
99
target="origin/$1"
1010
fi
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"
1321
files_inspected=`$result_info | grep "files inspected\|file inspected" | cut -d " " -f1`
1422
warning_count=`$result_info | grep "offenses detected\|offense detected" | cut -d " " -f4`
1523

0 commit comments

Comments
 (0)