Open
Conversation
Replace require('path') and require('fs') with proper ESM
imports. Fix --no-commit flag by using options.commit which
is how Commander parses negated boolean options.
Signed-off-by: Joaquim Rocha <me@joaquimrocha.com>
Each release now gets its own folder (<plugin>/<version>/) with artifacthub-pkg.yml and README.md, matching the layout required by ArtifactHub. Legacy top-level files are migrated automatically. Signed-off-by: Joaquim Rocha <me@joaquimrocha.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the releaser to use version based releases. It also updates the existing file based releases.
How to test
1. Test migration from legacy flat layout
This verifies that a plugin with a top-level
artifacthub-pkg.ymlgets migrated to a version directory.Verify:
app-catalog/<version>/artifacthub-pkg.ymlexists with correct contentapp-catalog/<version>/README.mdwas copied inapp-catalog/artifacthub-pkg.yml(top-level) was removedClean up:
git checkout -- app-catalog/2. Test creating a new template
Verify:
<plugin>/<version>/artifacthub-pkg.ymlwas created with TBD placeholders<plugin>/<version>/README.mdwas copied inartifacthub-pkg.ymlwas createdClean up:
rm -rf <plugin>/<version>/3. Test updating an already-versioned plugin
This verifies it works correctly when the plugin already uses the new layout (like flux after our earlier commit).
# flux already has 0.5.0/ and 0.6.0/ directories plugin-releaser artifacthub flux 0.6.0 --tarball flux/headlamp-k8s-flux-0.6.0.tar.gz --no-commitVerify:
flux/0.6.0/artifacthub-pkg.ymlwas updated (checksum/URL match the tarball)flux/0.6.0/README.mdexistsflux/artifacthub-pkg.ymlwas createdClean up:
git checkout -- flux/0.6.0/4. Test duplicate template is rejected
Verify: exits with error "artifacthub-pkg.yml already exists for flux v0.6.0"