Fix rive_native setup script path in Podfile

Ensures the rive_native setup script runs from the project root by updating its shell script phase in the Podfile. This change helps CI environments locate pubspec.yaml correctly.
This commit is contained in:
Feodor Fitsner 2026-01-21 18:33:31 -08:00
parent b925b45f17
commit a9523cafbe
1 changed files with 14 additions and 1 deletions

View File

@ -66,6 +66,19 @@ end
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) flutter_additional_ios_build_settings(target)
# Ensure rive_native's setup script runs from the project root so pubspec.yaml is found in CI.
if target.name == 'rive_native'
target.shell_script_build_phases.each do |phase|
script = phase.shell_script
next unless script&.include?('rive_native:setup')
next if script.include?('PROJECT_ROOT="${SRCROOT}/../.."')
phase.shell_script = script.sub(
"set -e\n",
"set -e\nPROJECT_ROOT=\"${SRCROOT}/../..\"\ncd \"$PROJECT_ROOT\"\n"
)
end
end
target.build_configurations.each do |config| target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [