Using git commit sha in tests #1916
Unanswered
sameersbn
asked this question in
Writing Formulae/Casks
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am writing a formula (snippet below) which builds the package from a git repo. The version sub command of the tool returns the sha of the git commit in it's output. In my tests, I want to check if the sha matches the one as specified in the formula (the
revisionfield). Is there a variable available which makes the git revision available for use in the tests?Thanks in advance.
in
assert_match("Git Revision: ", version_output)i want to do something likeassert_match("Git Revision: #{revision}", version_output)Beta Was this translation helpful? Give feedback.
All reactions