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

Improve the release script #2419

Open
markus-walther opened this issue Mar 6, 2023 · 2 comments
Open

Improve the release script #2419

markus-walther opened this issue Mar 6, 2023 · 2 comments
Labels
Accepted A feature request or issue is accepted and will be implemented Feature-request

Comments

@markus-walther
Copy link
Contributor

markus-walther commented Mar 6, 2023

Currently, npm run release runs into a number of stumbling blocks, as follows:

  1. Commands lerna and cross-env apparently need to be globally installed to be found by the script. This should not be necessary, and currently leads to silent failure of the release process.
  2. As it stands, it is not possible to enter the required 6-digit OTP token to satisfy npm two-factor authentication in the lerna publish sub-step.
  3. Releasing is restricted to the release branch, but no upfront check to determine such branch exists both locally and remotely is performed, with informative error messages on what to do and why this restriction is in-place.
  4. In case a release is botched for whatever reason, a subsequent attempt may fail due to the git tags issued by the lerna version sub-step already existing. The release script should force these git tags even if they exist, to facilitate robust re-releasing in the face of failures.
  5. The use of prepublishOnly and postpublish scripts in each Pattern-Library component's package.json is very brittle and has repeatedly led to failure, because these scripts edit the package.json file on disk but are not done transactionally, i.e. it is not the case that either both or none of these scripts are guaranteed to be executed. A better release process must not edit package.jsons.

Make the release script robust by removing the above stumbling blocks.

@markus-walther markus-walther added Feature-request Accepted A feature request or issue is accepted and will be implemented labels Mar 6, 2023
@markus-walther
Copy link
Contributor Author

See https://github.com/lerna/lerna/tree/main/libs/commands/publish#--otp for ways of submitting an OTP token to lerna.

@markus-walther
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted A feature request or issue is accepted and will be implemented Feature-request
Projects
None yet
Development

No branches or pull requests

1 participant