Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide the git commit sha when asked for --version in CLI #385

Merged
merged 2 commits into from
Feb 17, 2022

Conversation

erszcz
Copy link
Collaborator

@erszcz erszcz commented Feb 16, 2022

No description provided.

@erszcz erszcz requested a review from zuiderkwast February 16, 2022 15:02
Makefile Outdated
Comment on lines 58 to 59
ebin/gradualizer.app: src/gradualizer.app.src | ebin
cp $< $@
sed s/git/`git describe --tags --always`/ $< > $@
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it risky to replace all occurences of "git"? What if we add these three letters somewhere else in the app file?

Maybe sed 's/{vsn, *"git"}/{vsn, `git describe --tags --always`}/' is more safe..? (I don't know what rebar3 and erlang.mk does, but I suppose at least rebar3 parses the file and replaces only this occurrence.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, it definitely doesn't hurt to make the pattern more specific 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants