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

Incorrect publish folder layout for some RIDs #430

Closed
njlr opened this issue Apr 4, 2024 · 1 comment
Closed

Incorrect publish folder layout for some RIDs #430

njlr opened this issue Apr 4, 2024 · 1 comment

Comments

@njlr
Copy link
Contributor

njlr commented Apr 4, 2024

The folder structure generated by publish_binary does not match dotnet publish.
AFAICT, instead of using the supplied RID, it takes the resolved one.

Here is the work-around:

publish_binary(
  name = "app_alpine_x64",
  binary = ":app",
  target_framework = "net6.0",
  self_contained = True,
  runtime_identifier = "alpine-x64",
)

pkg_tar(
  name = "app_alpine_x64_archive",
  srcs = [
    ":app_alpine_x64",
  ],
  # strip_prefix = "app_alpine_x64/publish/linux-alpine-x64",
  strip_prefix = "app_alpine_x64/publish/linux-musl-x64",
  include_runfiles = True,
)

Full repro is here: https://github.com/njlr/rules-dotnet-publish-docker

The rule does not seem to take the user-defined attr into account?
https://github.com/bazelbuild/rules_dotnet/blob/master/dotnet/private/rules/publish_binary/publish_binary.bzl#L175

@njlr njlr changed the title Incorrect publish layout for some RIDs Incorrect publish folder layout for some RIDs Apr 4, 2024
@purkhusid
Copy link
Collaborator

This should now be fixed on master

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

No branches or pull requests

2 participants