tools: update node_modules tool documentation

The /npm install workflow has been dropped for a while now in
ae9404596a.
This commit is contained in:
Jelle van der Waa 2024-02-04 19:09:18 +01:00 committed by Allison Karlitskaya
parent ce58d96f97
commit 808e75cc68
1 changed files with 5 additions and 16 deletions

View File

@ -29,30 +29,19 @@ need to be regenerated, and a new commit recorded. That can be managed locally
by running
```
tools/node_modules rebuild
tools/node_modules install
```
which will produce a commit which is available for local testing.
When you are ready to open a pull request with your changes, it's not possible
to push your local `node_modules` commit. For security and reproducability
reasons, the commits used in the main branch of the project are always
generated by a script running in a controlled environment under GitHub Actions
as part of the CI setup of Cockpit.
You should push your changes with your updated `node_modules/` gitlink, but
without the locally-generated `node_modules` commit that it refers to. The CI
build will fail due to the broken reference. At this point, someone with write
access to the repository must write a comment into the PR:
When you are ready to open a pull request with your changes, push the newly
created `node_modules` commit to the cache by running
```
/npm install
tools/node_modules push
```
which will trigger a build of a new `node_modules` commit. The commit is
pushed as a tag to the `node-cache` repository. The bot will reply with a
command that you can run locally to make use of this "official" commit in your
new branch, and you'll have to rebase and force push.
Then create a pull request with your `package.json` and `node_modules` changes.
## GitHub setup notes (documentation for project admins)