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

Makefile: bring back the -node.tar.xz artifact #521

Merged

Conversation

allisonkarlitskaya
Copy link
Member

This is a partial revert of e64ce8d.

It's Fedora policy that we run esbuild during the rpm phase, so let's bring back the tarball with the things required to do that and include it in the packaging again.

We need to add a bit of a hack here: when we create the tarball we set all timestamps to the same value. If dist/ is missing, then we make sure package-lock.json is up to date before trying to run esbuild, but since all timestamps are the same, make will conclude that it needs to be rebuilt. In turn, that calls tools/node-modules, which gets upset because it's not in a git checkout. We can short-circuit that by touching package-lock.json when we delete dist/.

This is a partial revert of e64ce8d.

It's Fedora policy that we run esbuild during the rpm phase, so let's
bring back the tarball with the things required to do that and include
it in the packaging again.

We need to add a bit of a hack here: when we create the tarball we set
all timestamps to the same value.  If `dist/` is missing, then we make
sure `package-lock.json` is up to date before trying to run esbuild, but
since all timestamps are the same, `make` will conclude that it needs to
be rebuilt.  In turn, that calls `tools/node-modules`, which gets upset
because it's not in a git checkout.  We can short-circuit that by
touching `package-lock.json` when we delete `dist/`.
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

If that goes green, fine for me -- it's the trodden path and avoids getting stuck in review. Thanks!

If/when you land, please squash and edit in the "Fixes #508"

@martinpitt
Copy link
Member

rpm build log LGTM. It rebuilt dist/.

@allisonkarlitskaya allisonkarlitskaya merged commit be53c0b into cockpit-project:main Jun 6, 2024
14 checks passed
@jelly
Copy link
Member

jelly commented Jun 6, 2024

Thanks!

@allisonkarlitskaya allisonkarlitskaya deleted the node-cache branch June 19, 2024 21:41
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.

3 participants