Semantic-Release unable to detect Master branch

As the title suggests Semantic-Release is unable to detect the branch name

The script runs as a postbuild script, My deploys are configured to run exclusively on master branch.

Any idea why Semantic-Release is unable to detect that it’s in the master branch context?

No idea. We aren’t familiar with Semantic-Release specifically, but it seems like their check is not correct? I’d start by asking the authors of the code how they do that check, (or checking its code). We do the build entirely in your git repo as you can see from running commands like git branch --list during build.

Thank you for your reply i will try to investigate this further. I have used semantic release in other build environments like travis-ci and github actions and this is a first that i see such an error.

It seems that there is an issue open about Netlify in semantic-release repo

Thanks for sleuthing! Seems like the time might be ripe to file an issue on our build-image, then:

Then our team will take a look at it when they get a chance. I’d include the detail from that semantic-release issue that they are checking with the specific git command.

I can’t guarantee we’ll make any changes (I can guarantee I personally will not, but am not sure if our builds team will either) once you file it - but I can guarantee they won’t if you don’t file it :slight_smile: