There are many solutions, from the top of my head, if you have access to the repository:
- Locate the file the package id/name (or any info you’re looking for to change) is stored in
- Get its relative path, relative to the repository root, e.g.
./sub/dir/file.ext
- On bitrise, using the Script step, either modify the file (e.g. with
sed
or similar) OR overwrite the file
E.g. if you have write access to the repository, copy the file ./sub/dir/file.ext
to ./sub/dir/modified-file.ext
, and of course modify anything in it what you want to; then you can during the build simply replace that file with a Script step:
#!/bin/bash
set -ex
cp "./sub/dir/modified-file.ext" "./sub/dir/file.ext"
This will replace ./sub/dir/file.ext
with the ./sub/dir/modified-file.ext
. Do this right after the Git Clone step.
There are of course other solutions like:
- Using the Generic File Storage to store the modified file (http://devcenter.bitrise.io/tutorials/how-to-use-the-generic-file-storage/)
- Instead of replacing the file with another one in the Script you could modify the file with
grep
,awk
,sed
, … - Use a Step like Change value in file or Generate Text File (community created steps)
And probably at least a dozen other solutions - which one is best for you depends on your project and workflow, how you want to maintain this configuration