Skip to content

Commit

Permalink
docs: update lerna publishing resolution how-to (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz authored Jun 9, 2021
1 parent f012736 commit f87bb6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/how_tos/resolving_publishing_issues_with_lerna.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ In setting up the Lerna monorepo, there was a moment when the ``lerna publish``

The result of this publishing failure was that the Git repository was in a state as if the release had been published, without the same, matching version existing on the NPM registry. This document serves as a starting point to resolve that situation.

In the scenario where Git tags and a "chore: publish" commit were created for a new release without that release actually being published to NPM, you may temporarily modify the ``release.yml`` Github Action workflow file to run the following command instead of the default ``lerna publish``:
In the scenario where Git tags and a "chore: publish" commit were created for a new release without that release actually being published to NPM, you may `temporarily modify the release.yml Github Action workflow file <https://github.com/edx/frontend-enterprise/blob/master/.github/workflows/release.yml#L40>`_ to run the following command instead of the default ``lerna publish``:

::

lerna publish from-package --no-git-tag-version --no-push --yes
lerna publish from-package --yes

By including the ``from-package`` option, Lerna will determine the package version to publish based on the existing version noted in the package.json files of each package in the monorepo. The ``--no-git-tag-version`` option tells Lerna to not attempt to create new Git tags for this release, because in this scenario, they were already created. The ``--no-push`` option tells Lerna to avoid creating a new "chore: publish" commit.

See the `official Lerna documentation <https://github.com/lerna/lerna/tree/main/commands/publish#readme>`_ for more details.

Be sure to remember reverting the ``release.yml`` back to its original state once the published NPM package(s) are back in a good state with matching and correct versions.
Be sure to remember to change the ``release.yml`` back to its original state once the published NPM package(s) are back in a good state with matching and correct versions.

0 comments on commit f87bb6e

Please sign in to comment.