Skip to content

Commit

Permalink
[dotnet] Fix nuget target framework (#13253)
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko authored Dec 6, 2023
1 parent f08db9c commit 688345a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions dotnet/private/nuget_pack.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,7 @@ def _guess_dotnet_version(label, assembly_info):
# The dirname will be something like `bazel-out/darwin_arm64-fastbuild-ST-5c013bc87029/bin/dotnet/src/webdriver/bazelout/net5.0`
# Note that the last segment of the path is the framework we're
# targeting. Happy days!
full_path = assembly_info.libs[0].dirname

# And that framework is after the constant string `bazelout`
index = full_path.index(label.name)

# The actual start is at the _end_ of the `bazelout` string
index += len(label.name)

to_return = full_path[index:].replace("/", "")
return to_return.replace("/", "")
return assembly_info.libs[0].dirname.split("/")[::-1][0]

def nuget_pack_impl(ctx):
nuspec = ctx.actions.declare_file("%s-generated.nuspec" % ctx.label.name)
Expand Down

0 comments on commit 688345a

Please sign in to comment.