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

Adds --target-arch flag #331

Merged
merged 1 commit into from
Apr 17, 2024
Merged

Adds --target-arch flag #331

merged 1 commit into from
Apr 17, 2024

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Apr 16, 2024

Summary

Adds a --target-arch flag which causes the tool to only create a build pack for the target architecture. By default, it builds all architectures. It still supports the old format of buildpack which does not include arch information in the include-files field.

Use Cases

Resolves #330

I'm moving:

In addition, filter the metadata dependencies and only include those for the specified arch.

into #326 because it'll be easier to add there, cause it's not doing dependencies for multi-arch yet.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Adds a `--target-arch` flag which causes the tool to only create a build pack for the target architecture. By default, it builds all architectures. It still supports the old format of buildpack which does not include arch information in the include-files field.

Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa dmikusa added type:bug A general bug semver:patch A change requiring a patch version bump labels Apr 16, 2024
@dmikusa dmikusa requested a review from a team as a code owner April 16, 2024 23:42
@dmikusa dmikusa merged commit 72711c3 into main Apr 17, 2024
8 checks passed
@dmikusa dmikusa deleted the gh-330 branch April 17, 2024 12:51
@braunsonm
Copy link

@dmikusa can you clarify:

I'm moving:
into #326 because it'll be easier to add there, cause it's not doing dependencies for multi-arch yet.

So at this stage - create-package will download dependencies you won't need in your build output? But will they be included in the final pack output?

@dmikusa
Copy link
Contributor Author

dmikusa commented Apr 17, 2024

@braunsonm - Yes. For now, it will download everything that is in the metadata in buildpack.toml. You can filter dependencies with create-package, but presently it only works by id and by version, not by arch. That's what's going to be added as part of #326.

You could do something like the yj command I shared with you on Slack to apply a filter to buildpack.toml prior to running and create-package and that might help. I'm hoping to get #326 wrapped up in the next week or so. Then we can cut a release and get this shipped.

@braunsonm
Copy link

braunsonm commented Apr 17, 2024

I see.

I think we'll wait until that issue is also fixed before adopting this... for now we are going to have to keep pinning to old versions. Thanks for the quick turn around at least on this part of the issue.

dmikusa added a commit to paketo-buildpacks/libpak-tools that referenced this pull request Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add create-package flag so that it outputs a single arch
3 participants