Setting paths

I apologize for the noobish question…

I’ve added a step to modify the plist file prior to the build, but I can’t seem to get the path right.
The file is in the iOS project inside the Xamarin solution. I have the path set like this. ./iOS project folder/

1 Like

Hi @mleatherb,

If you use relative paths that’s relative to the root or the git repo, not to the project file.

Probably the easiest way to get the right path is:

  1. Git Clone the repository into a new directory on your Mac/Linux and cd into that directory. E.g.: git clone URL /tmp/repotest && cd /tmp/repotest
  2. Then check the relative path from there. A quick and simple test from the Terminal/Command line: ls -alh ./rel/path

If you get something like:

ls -alh ./configs/paths.go 

-rw-rw-r-- 1 viktorbenei viktorbenei 5,6K jun   29 13:10 configs/paths.go

Then the relative path is right (./configs/path.go in the above example). If you get something like:

ls -alh configs/paths2.go

ls: cannot access 'configs/paths2.go': No such file or directory

Then the relative path is incorrect.

I hope this helps, if you have any questions just let us know! :wink:

Another idea:

  1. Do the clean git clone as mentioned above (git clone URL /tmp/repotest && cd /tmp/repotest)
  2. Then change the file you’re looking for
  3. Now call git status

In the output you’ll see the relative path of the file, e.g.:

git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   configs/paths.go

no changes added to commit (use "git add" and/or "git commit -a")

The relative path is ./configs/paths.go in this example.

So, I wasn’t crazy after all. I had to include the actual file name (Info.plist) in the path. I had the path right all along…

Thank you for the help!

1 Like

Ahh, yes, indeed, depending on the step you might (usually do) have to include the “whole” relative path including the file, not just the containing directory’s path. Of course there are steps which expect a directory not a file (e.g. working directory inputs).

If the description of the input wasn’t clear enough feel free to create a github issue on the step’s github, or even send a PR (the inputs descriptions are read from the step.yml file).