Skip to content

Commit

Permalink
chore: Fix props to support more than one project
Browse files Browse the repository at this point in the history
Ran across this while working on open-feature/dotnet-sdk-contrib#127,
and tldr; if there's more than one project under `src/`, having the
`<PackageId>` hard-coded in `build/Common.prod.props` causes MSBuild
to panic.

There are two options to fix this:

1. ```diff
   - <PackageId>OpenFeature</PackageId>
   + <PackageId>$(MSBuildProjectName)</PackageId>
   ```
2. ```diff
   - <PackageId>OpenFeature</PackageId>
   ```

Since NuGet defaults `PackageId` to the assembly name, I'm opting
for (2), but if I've overlooked some nuance/custom build steps that
require setting `PackageId` explicitly, then we could just as well
fallback to (1).

Signed-off-by: Austin Drenski <austin@austindrenski.io>
  • Loading branch information
austindrenski authored and toddbaert committed Jan 19, 2024
1 parent f2b9b03 commit 71230e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Pack
if: ${{ steps.release.outputs.releases_created }}
run: |
dotnet pack OpenFeature.proj --configuration Release --no-build -p:PackageID=OpenFeature
dotnet pack OpenFeature.proj --configuration Release --no-build
- name: Publish to Nuget
if: ${{ steps.release.outputs.releases_created }}
Expand Down
1 change: 0 additions & 1 deletion build/Common.prod.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<RepositoryUrl>https://github.com/open-feature/dotnet-sdk</RepositoryUrl>
<Description>OpenFeature is an open standard for feature flag management, created to support a robust feature flag ecosystem using cloud native technologies. OpenFeature will provide a unified API and SDK, and a developer-first, cloud-native implementation, with extensibility for open source and commercial offerings.</Description>
<PackageTags>Feature;OpenFeature;Flags;</PackageTags>
<PackageId>OpenFeature</PackageId>
<PackageIcon>openfeature-icon.png</PackageIcon>
<PackageProjectUrl>https://openfeature.dev</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
Expand Down

0 comments on commit 71230e8

Please sign in to comment.