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

Automatically update package manifests for PRs #135

Open
innobead opened this issue Dec 6, 2023 · 5 comments
Open

Automatically update package manifests for PRs #135

innobead opened this issue Dec 6, 2023 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@innobead
Copy link
Owner

innobead commented Dec 6, 2023

          > here's a PR for `terraform` on Apple Silicon that includes the output from `make generate`.

is there room for improvement or automation or Github Action-ing of the make generate step? I hit a number of small issues with it, the most annoying being that make generate detected my personal huber repo and included all my tools in the diff. I'm also lazy and paranoid and don't really want to deal with a GITHUB_TOKEN, nor do I want to accidentally run the make publish action, or generally run any destructive action with an API Token.

It is feasible surely. Let's create a ticket first.

Originally posted by @innobead in #134 (comment)

@innobead innobead added the enhancement New feature or request label Dec 6, 2023
@innobead innobead added this to the v0.3.12 milestone Dec 8, 2023
@DanceMore
Copy link
Contributor

DanceMore commented Dec 8, 2023

I was attempting to bulk update the repo via vim *; however it did not seem like I was getting consistent or 100% of the output I expected during make generate. I checked in generator/src/build.rs and saw impacted elements listed, not commented out or something. I tried with FORCE_GENERATE=true, as well as rm-ing files to see if they'd be put back from scratch; again with somewhat confusing or incomplete behavior.

so I'm not sure what's missing in my dev environment, or what I might be doing wrong, or what assumption the generator might be making that I've missed (for example, I've seen file modification times moving backwards in time cause tools to break).

in fact, a closer reading of FORCE_GENERATE makes me unsure what it's intention is => https://github.com/innobead/huber/blob/main/crates/generator/src/build.rs#L75-L76

I'm definitely going to experiment a little more before I have anything concrete to propose.

@DanceMore
Copy link
Contributor

DanceMore commented Dec 9, 2023

diff --git a/crates/generator/src/pkg/arkade.rs b/crates/generator/src/pkg/arkade.rs
index 383e71f..b579941 100644
--- a/crates/generator/src/pkg/arkade.rs
+++ b/crates/generator/src/pkg/arkade.rs
@@ -40,6 +40,16 @@ pub fn release() -> Package {
                 tag_version_regex_template: None,
                 scan_dirs: None,
             }),
+            PackageTargetType::MacOSArm64(PackageManagement {
+                artifact_templates: vec!["{version}/arkade-darwin-arm64".to_string()],
+                executable_templates: None,
+                executable_mappings: None,
+                install_commands: None,
+                uninstall_commands: None,
+                upgrade_commands: None,
+                tag_version_regex_template: None,
+                scan_dirs: None,
+            }),
             PackageTargetType::Windows(PackageManagement {
                 artifact_templates: vec!["{version}/arkade.exe".to_string()],
                 executable_templates: None,

make generate does nothing on my machine with this patch applied.... rm generated/packages/arkade.yaml does not help.

here it is being added to the generator .release() calls => https://github.com/innobead/huber/blob/main/crates/generator/src/build.rs#L246

I am not sure what to investigate next 🤔 if I do not understand the generator, I cannot automate the generator :(

@innobead
Copy link
Owner Author

in fact, a closer reading of FORCE_GENERATE makes me unsure what it's intention is => main/crates/generator/src/build.rs#L75-L76

This is only for generating the manifest of the updated package. If there are no changes locally, no manifests will be regenerated.

@innobead
Copy link
Owner Author

make generate does nothing on my machine with this patch applied.... rm generated/packages/arkade.yaml does not help.

here it is being added to the generator .release() calls => main/crates/generator/src/build.rs#L246

I am not sure what to investigate next 🤔 if I do not understand the generator, I cannot automate the generator :(

Your observation is correct. make generate does not work consistently. I made the change at 166145c to improve that. Also, arkade has been updated for darwin arm64 as well at 1bb5c32.

@DanceMore
Copy link
Contributor

DanceMore commented Dec 28, 2023

I really wanted to use the "Github Suggestions" feature so a human could interactively approve or deny the generated changes but for $reasons, the Suggestions API isn't particularly useful for doing that.

so I might relax my desire to have automatic generator updates :(

I do think there are still some packages out of date, unpublished entirely (renote??), or missing now-supported architectures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants