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

Older git compat #10

Merged
merged 3 commits into from
Jun 20, 2018
Merged

Older git compat #10

merged 3 commits into from
Jun 20, 2018

Conversation

jollyromp
Copy link
Contributor

Found that on older git versions, it displayed name-rev like this: "remotes/origin/ci-prepare" grabbing only the branch name with this commit

@coveralls
Copy link

coveralls commented Jun 20, 2018

Coverage Status

Coverage increased (+0.1%) to 94.444% when pulling 9cd6c08 on older-git-compat into 75660fe on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 94.444% when pulling 9cd6c08 on older-git-compat into 75660fe on master.

@jollyromp jollyromp merged commit 36f3b69 into master Jun 20, 2018
@jollyromp jollyromp deleted the older-git-compat branch June 20, 2018 21:11
@@ -60,6 +60,10 @@ function getEnvIdFromBranch () {
try {
let branch = sh.exec('git name-rev HEAD --name-only').stdout

branch = branch.split('/')

branch = branch[branch.length - 1]
Copy link
Contributor

Choose a reason for hiding this comment

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

Could replace previous 2 lines with this:

branch = _.last(_.split(branch, '/'))

@jollyromp jollyromp restored the older-git-compat branch June 20, 2018 21:12
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.

None yet

3 participants