Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
ruby-version: ruby

- run: bundle install
env:
BUNDLE_FROZEN: true

# zizmor complains that 'v1' is a ref that can be provided by both the branch and tag namespaces.
# specify that we want the v1 branch.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ jobs:
ruby-version: 3.4

- run: bundle install
env:
BUNDLE_FROZEN: true
- run: bundle exec rake -t rubocop
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ jobs:
ruby-version: ${{ matrix.version }}

- run: bundle install
env:
BUNDLE_FROZEN: true
- run: bundle exec rake -t spec
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ GEM
public_suffix (>= 2.0.2, < 8.0)
ast (2.4.3)
bigdecimal (3.3.1)
bigdecimal (3.3.1-java)
connection_pool (2.5.5)
crack (1.0.1)
bigdecimal
Expand All @@ -26,6 +27,7 @@ GEM
ffi (1.17.2-arm-linux-gnu)
ffi (1.17.2-arm-linux-musl)
ffi (1.17.2-arm64-darwin)
ffi (1.17.2-java)
ffi (1.17.2-x86-linux-gnu)
ffi (1.17.2-x86-linux-musl)
ffi (1.17.2-x86_64-darwin)
Expand All @@ -44,6 +46,7 @@ GEM
domain_name (~> 0.5)
http-form_data (2.3.0)
json (2.18.0)
json (2.18.0-java)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
llhttp-ffi (0.5.1)
Expand All @@ -61,6 +64,7 @@ GEM
prism (1.8.0)
public_suffix (7.0.0)
racc (1.8.1)
racc (1.8.1-java)
rainbow (3.1.1)
rake (13.3.1)
regexp_parser (2.11.3)
Expand Down Expand Up @@ -122,6 +126,7 @@ PLATFORMS
arm-linux-gnu
arm-linux-musl
arm64-darwin
java
ruby
x86-linux-gnu
x86-linux-musl
Expand Down
4 changes: 4 additions & 0 deletions dev-bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ fi

check_command perl
check_command rake
check_command bundle

# Check that we're not on the main branch
current_branch=$(git branch --show-current)
Expand Down Expand Up @@ -84,6 +85,9 @@ fi

perl -pi -e "s/(?<=VERSION = \').+?(?=\')/$version/g" lib/minfraud/version.rb

# Update version in Gemfile.lock.
bundle install
Comment on lines +88 to +89

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For robustness, it's good practice to verify that a command exists before attempting to execute it. The script already does this for other commands like perl and rake in its pre-flight checks. A similar check should be added for bundle to ensure the script fails early with a clear error message if it's not installed.

While it would be ideal to add this check with the others at the top of the script, placing it here is a valuable improvement.

Suggested change
# Update version in Gemfile.lock.
bundle install
# Update version in Gemfile.lock.
check_command bundle
bundle install


echo $"Test results:"

rake
Expand Down