Open drbecavin opened 2 years ago
I'll make a PR if I get a chance, but in the meantime, here is some info that might help. I believe the issue boils down to differences between bash
and zsh
. For zsh
, the -p
on a read
command indicates that the value is to be read from a co-process, which is not the intended behavior here.
This worked for me with zsh
on the CLI, I imagine it translates pretty literally to the Makefile
:
read TAG\?"Version? (provide the next x.y.z semver) : " && echo "${TAG}"
It's worth finding a solution that works with either bash
or zsh
- I'm not sure if the above would satisfy that. One other option is to use echo
to avoid differences in how read
behaves. The -n
means "don't print a newline after the message" and I believe it behaves the same way for bash
and zsh
, but haven't confirmed it.
For example:
echo -n "Version? (provide the next x.y.z semver) : "
read TAG
echo "${TAG}"
Maybe support for bash
is less valuable since macOS switched the default shell to zsh
in the last couple of years. 🤷♂️
Useful resources:
Describe the bug When I do
make relase
On my MacOSX. It cannot write properly VERSION file. This is due to the read command which is not working as expected in zsh.To Reproduce Steps to reproduce the behavior: Run
make release
on a zsh shell.Expected behavior
The TAG variable will always be voiid and thus the VERSION file will be emplty. No release actions will be triggered in github.
Desktop (please complete the following information):
Additional context For the moment I change by hand the version number in VERSION file. And I changed Makefile with:
VERSION=$(shell cat checkatlas/VERSION)