bitrise
bitrise copied to clipboard
Don't specify `master` if no git branch is provided
Currently, the Bitrise CLI attempts to clone master explicitly if no git branch is provided in a bitrise.yml file. We should rely on the git server being used to provide us the default branch instead of assuming the default is master.
In addition to the CI run, I tested this locally on my machine by removing the @main from the generate_readme workflow for one of my steps. The workflow pulls the default branch (main) correctly, and runs successfully. 🎉
Moving this to a draft, as it's not working correctly yet.
@godrei I'd appreciate your insight here on if there are unintended side-effects this will cause.
So part of the release process for the CLI involves updating dependencies, but that seems to break things. I'm going to update dependencies in a separate PR to fix those problems, and come back to this one after that's merged.
@matrangam updated the dependencies in https://github.com/bitrise-io/bitrise/pull/797, so I didn't have to! This is ready for a re-review. 👍
I'm wondering now if this change should also update the version number used in the format_version property in bitrise.yml files? (I think that's defined here)
Seems like it'd be appropriate, so we know that if format_version is 12 or higher, we don't need to explicitly define the git branch if we want the default.
@ofalvai wdyt?
@hisaac I'm not familiar with how and when we increment the counter, but I like the idea and reasoning. I would ask someone else who knows why and when we increment the counter.
🎉 thanks for finishing this up @ofalvai!