Skip to content

Commit 1889fe8

Browse files
committed
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Add Company MSBuild property by default devlooped/oss@c509be4 - Add explicit write permissions from caller workflow devlooped/oss@8fa147d - Group MEAI packages together devlooped/oss@e733294 - Ensure lf for Scriban templates always devlooped/oss@4a9aa32 - Ignore .env files recursively devlooped/oss@3776526 - Switch to dotnet-env for .NET SDK setup devlooped/oss@56c2b85 - Improve default Product metadata, remove .git from user-facing URLs devlooped/oss@4339749 # devlooped/SponsorLink - Improve wording on editor usage requiring sponsorship devlooped/SponsorLink@21d8dac - Introduce standalone SponsorManifest for read/validate devlooped/SponsorLink@a755e4b - Fix version/override for CPV devlooped/SponsorLink@8a40822 - Bump JWT also in samples devlooped/SponsorLink@e8ec200
1 parent 830d326 commit 1889fe8

19 files changed

+93
-300
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# normalize by default
22
* text=auto encoding=UTF-8
33
*.sh text eol=lf
4+
*.sbn eol=lf
45

56
# These are windows specific files which we may as well ensure are
67
# always crlf on checkout

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ updates:
2424
Extensions:
2525
patterns:
2626
- "Microsoft.Extensions*"
27+
exclude-patterns:
28+
- "Microsoft.Extensions.AI*"
29+
ExtensionsAI:
30+
patterns:
31+
- "Microsoft.Extensions.AI*"
2732
Web:
2833
patterns:
2934
- "Microsoft.AspNetCore*"
@@ -38,3 +43,6 @@ updates:
3843
ProtoBuf:
3944
patterns:
4045
- "protobuf-*"
46+
Spectre:
47+
patterns:
48+
- "Spectre.Console*"

.github/workflows/build.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ env:
2828
GH_TOKEN: ${{ secrets.GH_TOKEN }}
2929
MSBUILDTERMINALLOGGER: auto
3030
Configuration: ${{ github.event.inputs.configuration || 'Release' }}
31+
SLEET_FEED_URL: ${{ vars.SLEET_FEED_URL }}
3132

3233
defaults:
3334
run:
@@ -65,12 +66,7 @@ jobs:
6566
fetch-depth: 0
6667

6768
- name: ⚙ dotnet
68-
uses: actions/setup-dotnet@v4
69-
with:
70-
dotnet-version: |
71-
6.x
72-
8.x
73-
9.x
69+
uses: devlooped/actions-dotnet-env@v1
7470

7571
- name: 🙏 build
7672
run: dotnet build -m:1 -bl:build.binlog
@@ -104,6 +100,9 @@ jobs:
104100
submodules: recursive
105101
fetch-depth: 0
106102

103+
- name: ⚙ dotnet
104+
uses: devlooped/actions-dotnet-env@v1
105+
107106
- name: ✓ ensure format
108107
run: |
109108
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget

.github/workflows/dotnet-file.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@ env:
1212

1313
jobs:
1414
run:
15+
permissions:
16+
contents: write
1517
uses: devlooped/oss/.github/workflows/dotnet-file-core.yml@main
16-
secrets: inherit
18+
secrets:
19+
BOT_NAME: ${{ secrets.BOT_NAME }}
20+
BOT_EMAIL: ${{ secrets.BOT_EMAIL }}
21+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/publish.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ env:
1515
VersionLabel: ${{ github.ref }}
1616
GH_TOKEN: ${{ secrets.GH_TOKEN }}
1717
MSBUILDTERMINALLOGGER: auto
18-
18+
SLEET_FEED_URL: https://api.nuget.org/v3/index.json
19+
1920
jobs:
2021
publish:
2122
runs-on: ${{ vars.PUBLISH_AGENT || 'ubuntu-latest' }}
@@ -27,12 +28,7 @@ jobs:
2728
fetch-depth: 0
2829

2930
- name: ⚙ dotnet
30-
uses: actions/setup-dotnet@v4
31-
with:
32-
dotnet-version: |
33-
6.x
34-
8.x
35-
9.x
31+
uses: devlooped/actions-dotnet-env@v1
3632

3733
- name: 🙏 build
3834
run: dotnet build -m:1 -bl:build.binlog

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ BenchmarkDotNet.Artifacts
1111
.genaiscript
1212
.idea
1313
local.settings.json
14+
.env
1415

1516
*.suo
1617
*.sdf

.netconfig

Lines changed: 30 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@
2929
weak
3030
[file ".gitattributes"]
3131
url = https://github.com/devlooped/oss/blob/main/.gitattributes
32-
sha = 5f92a68e302bae675b394ef343114139c075993e
32+
sha = 4a9aa321c4982b83c185cf8dffed181ff84667d5
3333

34-
etag = 338ba6d92c8d1774363396739c2be4257bfc58026f4b0fe92cb0ae4460e1eff7
34+
etag = 09cad18280ed04b67f7f87591e5481510df04d44c3403231b8af885664d8fd58
3535
weak
3636
[file ".github/dependabot.yml"]
3737
url = https://github.com/devlooped/oss/blob/main/.github/dependabot.yml
38-
sha = 49661dbf0720cde93eb5569be7523b5912351560
38+
sha = e733294084fb3e75d517a2e961e87df8faae7dc6
3939

40-
etag = c147ea2f3431ca0338c315c4a45b56ee233c4d30f8d6ab698d0e1980a257fd6a
40+
etag = 3bf8d9214a15c049ca5cfe80d212a8cbe4753b8a638a9804ef73d34c7def9618
4141
weak
4242
[file ".github/workflows/build.yml"]
4343
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
44-
sha = 06e898ccba692566ebf845fa7c8833ac6c318c0a
44+
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
4545

46-
etag = 0a4b3f0a875cd8c9434742b4046558aecf610d3fa3d490cfd2099266e95e9195
46+
etag = bf99c19427f4372ecfe38ec56aa8c411058684fb717da5661f17ac00388b3602
4747
weak
4848
[file ".github/workflows/changelog.yml"]
4949
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.yml
@@ -53,21 +53,21 @@
5353
weak
5454
[file ".github/workflows/dotnet-file.yml"]
5555
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file.yml
56-
sha = 59aaf432369b5ea597831d4feec5a6ac4024c2e3
56+
sha = 8fa147d4799d73819040736c399d0b1db2c2d86c
5757

58-
etag = 1374e3f8c9b7af69c443605c03f7262300dcb7d783738d9eb9fe84268ed2d10c
58+
etag = 1ca805a23656e99c03f9d478dba8ccef6e571f5de2ac0e9bb7e3c5216c99a694
5959
weak
6060
[file ".github/workflows/publish.yml"]
6161
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
62-
sha = 06e898ccba692566ebf845fa7c8833ac6c318c0a
62+
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
6363

64-
etag = 2f64f75ad01f735fd05290370fb8a826111ac8dd7e74ce04226bb627a54a62ba
64+
etag = 2ef43521627aa3a91dd55bdc2856ec0c6a93b42485d4fe9d6b181f9ee42c8e18
6565
weak
6666
[file ".gitignore"]
6767
url = https://github.com/devlooped/oss/blob/main/.gitignore
68-
sha = e0be248fff1d39133345283b8227372b36574b75
68+
sha = 3776526342afb3f57da7e80f2095e5fdca3c31c9
6969

70-
etag = c449ec6f76803e1891357ca2b8b4fcb5b2e5deeff8311622fd92ca9fbf1e6575
70+
etag = 11767f73556aa4c6c8bcc153b77ee8e8114f99fa3b885b0a7d66d082f91e77b3
7171
weak
7272
[file "Directory.Build.rsp"]
7373
url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp
@@ -92,15 +92,15 @@
9292
etag = 2c6335b37e4ae05eea7c01f5d0c9d82b49c488f868a8b5ba7bff7c6ff01f3994
9393
[file "src/Directory.Build.props"]
9494
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
95-
sha = b76de49afb376aa48eb172963ed70663b59b31d3
95+
sha = c509be4378ff6789df4f66338cb88119453c0975
9696

97-
etag = c8b56f3860cc7ccb8773b7bd6189f5c7a6e3a2c27e9104c1ee201fbdc5af9873
97+
etag = cbbdc1a4d3030f353f3e5306a6c380238dd4ed0945aad2d56ba87b49fcfcd66d
9898
weak
9999
[file "src/Directory.Build.targets"]
100100
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
101-
sha = a8b208093599263b7f2d1fe3854634c588ea5199
101+
sha = 4339749ef4b8f66def75931df09ef99c149f8421
102102

103-
etag = 19087699f05396205e6b050d999a43b175bd242f6e8fac86f6df936310178b03
103+
etag = 8b4492765755c030c4c351e058a92f53ab493cab440c1c0ef431f6635c4dae0e
104104
weak
105105
[file "src/kzu.snk"]
106106
url = https://github.com/devlooped/oss/blob/main/src/kzu.snk
@@ -225,16 +225,16 @@
225225
weak
226226
[file "src/SponsorLink/SponsorLink.Analyzer.Tests.targets"]
227227
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink.Analyzer.Tests.targets
228-
sha = df44ccc14cc11b5674c55aca9ba8596bdbcf8438
228+
sha = 8a4082211918b604ad95ef0f3da3cd414747c46a
229229

230-
etag = a3e9cbcc227dd56a7bed236eaded136f1b80f9f36a4fabce8be695ee844bf881
230+
etag = ac4e82c24d5a812eb7a1ad20d2d076b7aeedddd90c8196eaea0c227693a2ede6
231231
weak
232232
[file "src/SponsorLink/SponsorLink.Analyzer.targets"]
233233
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink.Analyzer.targets
234-
sha = 0f551e3be564625ee4d078649c55363bf35954ba
234+
sha = 8a4082211918b604ad95ef0f3da3cd414747c46a
235235

236236

237-
etag = 7276d81830e29f8d5f3e27ee62cadaf7aef02a0162b9a05c88e1daef9cc4875e
237+
etag = b75dd01945453c3ccd9eb96f65959ff1607a2cf11226fac5014b01b7cb6314d7
238238
weak
239239
[file "src/SponsorLink/SponsorLink/AnalyzerOptionsExtensions.cs"]
240240
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/AnalyzerOptionsExtensions.cs
@@ -254,12 +254,6 @@
254254

255255
etag = a5d79dbc0ed9fac4fb1879fb3790b9ebab18e47c14c454554ce9f53f21487bb5
256256
weak
257-
[file "src/SponsorLink/SponsorLink/ManifestStatus.cs"]
258-
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/ManifestStatus.cs
259-
sha = f47528874a6d9192b5546f84b455f5ccc474a707
260-
261-
etag = e46848f83c0436ba33a1c09a4060ad627a74db41bab66bb37ca40fce8a6532a7
262-
weak
263257
[file "src/SponsorLink/SponsorLink/Resources.es-AR.resx"]
264258
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/Resources.es-AR.resx
265259
sha = 586398c3e650495f36601ecc8983a14ed745e058
@@ -268,28 +262,28 @@
268262
weak
269263
[file "src/SponsorLink/SponsorLink/Resources.es.resx"]
270264
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/Resources.es.resx
271-
sha = 29921560c73bb91c2a21a21800daf0b250773598
265+
sha = 21d8dac3077c75cd07d7cc7f9e10f2620afce834
272266

273-
etag = feb9dc86e4d9c0c4a294cd6e03c5b914943e8d206b88a125abd1b0f882ddb247
267+
etag = 89a7bb797aeacca43e043196a00eea91f282df4caf9bbe937749026a03f707ad
274268
weak
275269
[file "src/SponsorLink/SponsorLink/Resources.resx"]
276270
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/Resources.resx
277-
sha = 29921560c73bb91c2a21a21800daf0b250773598
271+
sha = 21d8dac3077c75cd07d7cc7f9e10f2620afce834
278272

279-
etag = 7665a3be17cd224b1c413ade6a9c1c5a822dace1e7f9daae33a2e52d8bca15bb
273+
etag = 8902652b8907de2fbccf73f3738d0fce503fc667a084171d6b88bf3373e559e7
280274
weak
281275
[file "src/SponsorLink/SponsorLink/SponsorLink.cs"]
282276
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/SponsorLink.cs
283-
sha = 3f72a9fd35274a659dd380a7d5b747d71b9732a1
277+
sha = a755e4be0f7cb73cfde208857e28f7cfeba2dcc3
284278

285-
etag = 616598e0ecb6d2ce97660aa6ac049e2a31a1c953669743b7b612b61d40c37706
279+
etag = 402e2beb11cf64c07be3d0fc3e89115fd09fc24133c08a8951bf0e784909c510
286280
weak
287281
[file "src/SponsorLink/SponsorLink/SponsorLink.csproj"]
288282
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/SponsorLink.csproj
289-
sha = 0f551e3be564625ee4d078649c55363bf35954ba
283+
sha = e8ec200934a3b3788c2e31d7022c717f5fd152fa
290284

291285

292-
etag = 27db7c8288b721804b52a719a9218ab1198f4db5b7a7d06bce4e1770def2d4a0
286+
etag = 1a58baf82b1813f68610272aa6161a18a70d5c619154734039a0d48fce6d735a
293287
weak
294288
[file "src/SponsorLink/SponsorLink/SponsorLinkAnalyzer.cs"]
295289
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/SponsorLink/SponsorLinkAnalyzer.cs
@@ -375,12 +369,6 @@
375369

376370
etag = 1875555adb7eab21acf1e730b6baeb8c095d9f6f9f07303a87ad9c16e0f6490d
377371
weak
378-
[file "src/SponsorLink/Tests/SponsorLinkTests.cs"]
379-
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/Tests/SponsorLinkTests.cs
380-
sha = f47528874a6d9192b5546f84b455f5ccc474a707
381-
382-
etag = 1fa41250bd984e8aa840a966d34ce0e94f2111d1422d7f50b864c38364fcf4a4
383-
weak
384372
[file "src/SponsorLink/Tests/SponsorableManifest.cs"]
385373
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/Tests/SponsorableManifest.cs
386374
sha = f47528874a6d9192b5546f84b455f5ccc474a707
@@ -389,10 +377,10 @@
389377
weak
390378
[file "src/SponsorLink/Tests/Tests.csproj"]
391379
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/Tests/Tests.csproj
392-
sha = 0f551e3be564625ee4d078649c55363bf35954ba
380+
sha = e8ec200934a3b3788c2e31d7022c717f5fd152fa
393381

394382

395-
etag = 7d27c17944c61da196f11f904383b25b3f40579fbeb0cacb367bf05ec184ad7f
383+
etag = eb34fc9fe25b0169f069ff692379a19c59673727d8abb6f45816012661329df5
396384
weak
397385
[file "src/SponsorLink/Tests/keys/kzu.key"]
398386
url = https://github.com/devlooped/SponsorLink/blob/main/samples/dotnet/Tests/keys/kzu.key

readme.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,29 @@ The versioning scheme for packages is:
7979
[![Kori Francis](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/kfrancis.png "Kori Francis")](https://github.com/kfrancis)
8080
[![Toni Wenzel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/twenzel.png "Toni Wenzel")](https://github.com/twenzel)
8181
[![Uno Platform](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/unoplatform.png "Uno Platform")](https://github.com/unoplatform)
82-
[![Dan Siegel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/dansiegel.png "Dan Siegel")](https://github.com/dansiegel)
8382
[![Reuben Swartz](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/rbnswartz.png "Reuben Swartz")](https://github.com/rbnswartz)
8483
[![Jacob Foshee](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jfoshee.png "Jacob Foshee")](https://github.com/jfoshee)
8584
[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Mrxx99.png "")](https://github.com/Mrxx99)
8685
[![Eric Johnson](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/eajhnsn1.png "Eric Johnson")](https://github.com/eajhnsn1)
87-
[![Ix Technologies B.V.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/IxTechnologies.png "Ix Technologies B.V.")](https://github.com/IxTechnologies)
8886
[![David JENNI](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/davidjenni.png "David JENNI")](https://github.com/davidjenni)
8987
[![Jonathan ](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Jonathan-Hickey.png "Jonathan ")](https://github.com/Jonathan-Hickey)
9088
[![Charley Wu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/akunzai.png "Charley Wu")](https://github.com/akunzai)
9189
[![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png "Ken Bonny")](https://github.com/KenBonny)
9290
[![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png "Simon Cropp")](https://github.com/SimonCropp)
9391
[![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png "agileworks-eu")](https://github.com/agileworks-eu)
94-
[![sorahex](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sorahex.png "sorahex")](https://github.com/sorahex)
9592
[![Zheyu Shen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/arsdragonfly.png "Zheyu Shen")](https://github.com/arsdragonfly)
9693
[![Vezel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/vezel-dev.png "Vezel")](https://github.com/vezel-dev)
9794
[![ChilliCream](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ChilliCream.png "ChilliCream")](https://github.com/ChilliCream)
9895
[![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png "4OTC")](https://github.com/4OTC)
9996
[![Vincent Limo](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/v-limo.png "Vincent Limo")](https://github.com/v-limo)
10097
[![Jordan S. Jones](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jordansjones.png "Jordan S. Jones")](https://github.com/jordansjones)
10198
[![domischell](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/DominicSchell.png "domischell")](https://github.com/DominicSchell)
99+
[![Justin Wendlandt](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jwendl.png "Justin Wendlandt")](https://github.com/jwendl)
100+
[![Adrian Alonso](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/adalon.png "Adrian Alonso")](https://github.com/adalon)
101+
[![Michael Hagedorn](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Eule02.png "Michael Hagedorn")](https://github.com/Eule02)
102+
[![Alex Rønne Petersen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/alexrp.png "Alex Rønne Petersen")](https://github.com/alexrp)
103+
[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/henkmartijn.png "")](https://github.com/henkmartijn)
104+
[![Sebastien Lebreton](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sailro.png "Sebastien Lebreton")](https://github.com/sailro)
102105

103106

104107
<!-- sponsors.md -->

src/Directory.Build.props

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
<PropertyGroup Label="NuGet">
2222
<Authors>Daniel Cazzulino</Authors>
23+
<Company>Devlooped</Company>
2324
<Copyright>Copyright (C) Daniel Cazzulino and Contributors. All rights reserved.</Copyright>
2425
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2526
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@@ -126,6 +127,8 @@
126127
<_VersionLabel>$(_VersionLabel.Replace('/merge', ''))</_VersionLabel>
127128
<!-- Finally sanitize the branch with dashes, so we can build path-separated branches, like rel/v1.0.0 or feature/foo -->
128129
<_VersionLabel>$(_VersionLabel.Replace('/', '-'))</_VersionLabel>
130+
<!-- And underscores which are also invalid labels, so we can use branches like dev/feature_foo -->
131+
<_VersionLabel>$(_VersionLabel.Replace('_', '-'))</_VersionLabel>
129132

130133
<!-- Set sanitized version to the actual version suffix used in build/pack -->
131134
<VersionSuffix Condition="!$(VersionLabel.Contains('refs/tags/'))">$(_VersionLabel)</VersionSuffix>
@@ -153,6 +156,18 @@
153156
<Import Project="Directory.props" Condition="Exists('Directory.props')"/>
154157
<Import Project="Directory.props.user" Condition="Exists('Directory.props.user')" />
155158

159+
<!-- If the imported props changed ManagePackageVersionsCentrally, we need to replicate
160+
the Version defaults from Microsoft.NET.DefaultAssemblyInfo.targets since it's too
161+
early here and Directory.Packages.props will be imported right after this time,
162+
meaning dependencies that expect to use the currently building Version would not
163+
get the expected value.
164+
-->
165+
<PropertyGroup Condition="'$(ManagePackageVersionsCentrally)' == 'true' and '$(Version)' == ''">
166+
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">1.0.0</VersionPrefix>
167+
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
168+
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
169+
</PropertyGroup>
170+
156171
<!-- Implemented by SDK in .targets, guaranteeing it's overwritten. Added here since we add a DependsOnTargets to it.
157172
Covers backwards compatiblity with non-SDK projects. -->
158173
<Target Name="InitializeSourceControlInformation" />

src/Directory.Build.targets

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@
165165

166166
<PropertyGroup>
167167
<RepositoryRoot>@(_GitSourceRoot)</RepositoryRoot>
168+
<!-- Only change if it wasn't just the default from Microsoft.NET.DefaultAssemblyInfo.targets -->
169+
<ProductFromUrl Condition="'$(SourceControlInformationFeatureSupported)' == 'true'">$([System.IO.Path]::GetFileNameWithoutExtension($(PrivateRepositoryUrl)))</ProductFromUrl>
170+
<Product Condition="'$(Product)' == '$(AssemblyName)' and '$(ProductFromUrl)' != ''">$(ProductFromUrl)</Product>
168171
</PropertyGroup>
169172

170173
</Target>
@@ -175,9 +178,9 @@
175178
Condition="'$(SourceControlInformationFeatureSupported)' == 'true' And
176179
'$(IsPackable)' == 'true'">
177180
<PropertyGroup>
178-
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == '' and '$(PublishRepositoryUrl)' == 'true'">$(RepositoryUrl)</PackageProjectUrl>
181+
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == '' and '$(PublishRepositoryUrl)' == 'true'">$(RepositoryUrl.Replace('.git', ''))</PackageProjectUrl>
179182
<PackageDescription>$(Description)</PackageDescription>
180-
<PackageReleaseNotes Condition="'$(RepositoryUrl)' != '' and Exists('$(MSBuildThisFileDirectory)..\changelog.md')">$(RepositoryUrl)/blob/main/changelog.md</PackageReleaseNotes>
183+
<PackageReleaseNotes Condition="'$(RepositoryUrl)' != '' and Exists('$(MSBuildThisFileDirectory)..\changelog.md')">$(RepositoryUrl.Replace('.git', ''))/blob/main/changelog.md</PackageReleaseNotes>
181184
</PropertyGroup>
182185
</Target>
183186

0 commit comments

Comments
 (0)