Generate flatpakref files for addon/plugin refs during publish#161
Open
razzeee wants to merge 3 commits intoflatpak:masterfrom
Open
Generate flatpakref files for addon/plugin refs during publish#161razzeee wants to merge 3 commits intoflatpak:masterfrom
razzeee wants to merge 3 commits intoflatpak:masterfrom
Conversation
eb0a7e7 to
b96b9f1
Compare
The publish job was only generating .flatpakref files for app/ refs. Mirror the commit job's logic by also generating them for runtime/ refs that are not auto-generated sub-refs (.Debug, .Locale, .Sources, .Docs), so addons and plugins get a .flatpakref in the main repo appstream dir. Extract the shared predicate into should_generate_flatpakref() in utils.rs so both jobs stay in sync from a single source of truth. Add unit tests for both should_generate_flatpakref() and generate_flatpakref().
b96b9f1 to
72ef200
Compare
| )); | ||
| } | ||
|
|
||
| #[test] |
Member
There was a problem hiding this comment.
all those tests for should_generate_flatpakref should really be merged
| /// **Both the commit job and the publish job use this predicate** to decide which refs get a | ||
| /// `.flatpakref` file. | ||
| pub fn should_generate_flatpakref(ref_name: &str) -> bool { | ||
| let unwanted_exts = [".Debug", ".Locale", ".Sources", ".Docs"]; |
Member
There was a problem hiding this comment.
this should be const &[&str; 4] as those never change
8a9c997 to
ef6f98c
Compare
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.
The publish job was only generating .flatpakref files for app/ refs. Mirror the commit job's logic by also generating them for runtime/ refs that are not auto-generated sub-refs (.Debug, .Locale, .Sources, .Docs), so addons and plugins get a .flatpakref in the main repo appstream dir.