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

Do not reject detached HEAD when publishing a canary release #711

Merged
merged 2 commits into from Mar 22, 2017

Conversation

evocateur
Copy link
Member

@evocateur evocateur commented Mar 22, 2017

Motivation and Context

To facilitate --canary publishes in CI, we shouldn't break lerna publish when it detects a detached HEAD when canary is enabled. We also need to avoid calling git symbolic-ref because it breaks in detached HEAD situations (which is going to be the case for a vast majority of CI environments). I renamed the GitUtilities method isDetachedHead() to better express its intent.

I've also clarified some of the internal flag parsing, creating a new gitEnabled instance property that better describes the intent behind !(this.flags.canary || this.flags.skipGit). I was able to simplify some of the conditionals as a result.

This fixes #699

How Has This Been Tested?

I reordered the appropriate ChildProcessUtilities.execSync stubs, and added a new test for a complicated set of configuration to improve coverage.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@evocateur evocateur added this to the v2.0.0 milestone Mar 22, 2017
@evocateur evocateur merged commit e4b74a6 into lerna:master Mar 22, 2017
@evocateur evocateur deleted the relax-git-during-canary branch March 22, 2017 17:57
@lock
Copy link

lock bot commented Dec 27, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[beta.38] Broken canary publish from CI (Travis)
1 participant