Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/lint-js-and-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
paths-ignore:
- '**.md'
- 'docs/**'
workflow_dispatch:

jobs:
detect-changes:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
paths-ignore:
- '**.md'
- 'docs/**'
workflow_dispatch:

jobs:
detect-changes:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/package-js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'docs/**'
- 'lib/**'
- 'spec/react_on_rails/**'
workflow_dispatch:

jobs:
detect-changes:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pro-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- 'master'
pull_request:
workflow_dispatch:

defaults:
run:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pro-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- 'master'
pull_request:
workflow_dispatch:

defaults:
run:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pro-package-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- 'master'
pull_request:
workflow_dispatch:

defaults:
run:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rspec-package-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'docs/**'
- 'packages/react-on-rails/src/**'
- 'node_package/src/**'
workflow_dispatch:

jobs:
detect-changes:
Expand Down
17 changes: 16 additions & 1 deletion rakelib/shakapacker_examples.rake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,22 @@ namespace :shakapacker_examples do # rubocop:disable Metrics/BlockLength
sh_in_dir(example_type.dir, "echo \"gem 'shakapacker', '>= 8.2.0'\" >> #{example_type.gemfile}")
bundle_install_in(example_type.dir)
sh_in_dir(example_type.dir, "rake shakapacker:install")
sh_in_dir(example_type.dir, example_type.generator_shell_commands)

# Skip validation during generator run since npm package isn't installed yet
#
# ENV Variable Scope: We prefix each shell command with the ENV variable rather than
# setting it in the Ruby process for these reasons:
#
# 1. Each command spawns a new shell process with its own environment
# 2. The ENV variable is automatically scoped to each command (no cleanup needed)
# 3. This differs from the generator approach in lib/generators/react_on_rails/install_generator.rb
# which sets ENV in the Ruby process and requires explicit cleanup
#
# This approach is simpler and safer for rake tasks that invoke shell commands.
generator_commands = example_type.generator_shell_commands.map do |cmd|
"REACT_ON_RAILS_SKIP_VALIDATION=true #{cmd}"
end
sh_in_dir(example_type.dir, generator_commands)
sh_in_dir(example_type.dir, "yarn")
end
end
Expand Down