docker-build-tools-ci
docker-build-tools-ci copied to clipboard
Add logic to try and fetch the default branch from Git
Because Github now uses main as the default Git branch by default, anyone using this script on their site will now have to always set the DEFAULT_BRANCH CircleCI variable to get this script to work for multidev environments. Can we try and add some logic to check what the default branch is by default using Git itself?
Reference: https://davidwalsh.name/get-default-branch-name
Alternatively, we could skip the Git remote logic call and just update the default to main but this would break builds on projects with a default branch of master still.
Occasionally we make breaking changes and bump up the major version here e.g. we could go to 7.x and default to main there.