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:
parent
b925b45f17
commit
a9523cafbe
|
|
@ -66,6 +66,19 @@ end
|
|||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |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|
|
||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
|
||||
|
|
@ -85,4 +98,4 @@ post_install do |installer|
|
|||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue