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

headlamp-plugin: Add package command #2175

Merged
merged 2 commits into from
Jul 24, 2024
Merged

Conversation

joaquimrocha
Copy link
Collaborator

This command creates a tarball in the format that headlamp-plugin expects to be in when we use the install command.

@joaquimrocha joaquimrocha requested review from illume and yolossn and removed request for illume July 19, 2024 10:02
@joaquimrocha joaquimrocha added enhancement New feature or request frontend Issues related to the frontend headlamp-plugin Related to the headlamp-plugin NPM package. and removed frontend Issues related to the frontend labels Jul 19, 2024
@joaquimrocha joaquimrocha modified the milestone: v0.25.0 Jul 19, 2024
Copy link
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

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

Nice one. Left a few comments for your consideration.

plugins/headlamp-plugin/bin/headlamp-plugin.js Outdated Show resolved Hide resolved
plugins/headlamp-plugin/bin/headlamp-plugin.js Outdated Show resolved Hide resolved
@yolossn
Copy link
Contributor

yolossn commented Jul 19, 2024

Not a blocker but It would be nice to have the command also print the checksum that can be used in the artifacthub-pkg.yaml.

@joaquimrocha joaquimrocha force-pushed the create-headlamp-plugin-pack branch from 19271ba to a45197f Compare July 19, 2024 18:21
@joaquimrocha
Copy link
Collaborator Author

Updated the branch with the checksum printing, test, and error when the final tarball already exists.

@joaquimrocha joaquimrocha force-pushed the create-headlamp-plugin-pack branch from a45197f to fceec7a Compare July 19, 2024 18:23
This command creates a tarball in the format that headlamp-plugin
expects to be in when we use the install command.

Signed-off-by: Joaquim Rocha <[email protected]>
@joaquimrocha joaquimrocha force-pushed the create-headlamp-plugin-pack branch from fceec7a to 17ac1ec Compare July 22, 2024 13:07
@joaquimrocha
Copy link
Collaborator Author

I have updated it again:

  • Now the command is called package instead of pack so we keep the latter for NPM
  • Now the command defaults to the current dir in both options, like build does
  • Added the package script to the template package.json

@joaquimrocha joaquimrocha changed the title headlamp-plugin: Add pack command headlamp-plugin: Add package command Jul 23, 2024
Copy link
Contributor

@yolossn yolossn left a comment

Choose a reason for hiding this comment

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

Getting this error message but the tar.gz file is created

image

when i try to extract the tar.gz file I am getting this error
image

@joaquimrocha
Copy link
Collaborator Author

@yolossn there was an error in extract as it didn't return the error code when no packages were extracted. I have updated that.

Copy link
Contributor

@yolossn yolossn left a comment

Choose a reason for hiding this comment

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

Tested.

image

Copy link
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

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

👍 great!

@illume illume merged commit 292e990 into main Jul 24, 2024
14 checks passed
@illume illume deleted the create-headlamp-plugin-pack branch July 24, 2024 13:06
vyncent-t pushed a commit that referenced this pull request Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request headlamp-plugin Related to the headlamp-plugin NPM package.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants