0

There's a codemagic guide that shows how to use google-services.json and GoogleService-Info.plist without committing them to the main repo:

https://docs.codemagic.io/custom-scripts/load-firebase-configuration/

I've renamed the variables used, but otherwise followed the steps exactly for my project. The pre-build script shows this error:

/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_script_3_0_ef_shxdc: line 5: /Users/builder/clone/android/app/google-services.json: No such file or directory

The "No such file or directory" makes me wonder if the $FCI_BUILD_DIR variable isn't right?

Any help would be appreciated

oodavid
  • 2,148
  • 2
  • 23
  • 26

1 Answers1

2

The error shows that your $FCI_BUILD_DIR is expanded correctly. First thing you can do is make sure the parent directory exists.

if not you can just add this: mkdir -p $FCI_BUILD_DIR/android/app before the echo.. part. and if needed the same with /ios/Runner

or if your project exists within a subdirectory then you will need to reflect the directory structure in your pre-build script.

  • Thanks @rimante-valancauskaite - my project lives within a subdirectory, so the cp command must reflect that. Hence the error! – oodavid Jan 09 '20 at 16:05