diff --git a/.editorconfig b/.editorconfig index 4cab270..3ba6837 100644 --- a/.editorconfig +++ b/.editorconfig @@ -30,6 +30,8 @@ indent_size = 2 # Dotnet code style settings: [*.{cs,vb}] +tab_width = 4 + # Sort using and Import directives with System.* appearing first dotnet_sort_system_directives_first = true # Avoid "this." and "Me." if not necessary @@ -57,6 +59,9 @@ dotnet_style_require_accessibility_modifiers = omit_if_default:error # IDE0040: Add accessibility modifiers dotnet_diagnostic.IDE0040.severity = error +# IDE1100: Error reading content of source file 'Project.TargetFrameworkMoniker' (i.e. from ThisAssembly) +dotnet_diagnostic.IDE1100.severity = none + [*.cs] # Top-level files are definitely OK csharp_using_directive_placement = outside_namespace:silent diff --git a/.gitattributes b/.gitattributes index 4f89148..3095556 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,7 @@ # normalize by default * text=auto encoding=UTF-8 *.sh text eol=lf +*.sbn eol=lf # These are windows specific files which we may as well ensure are # always crlf on checkout diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 949c432..11c5d7d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -24,6 +24,11 @@ updates: Extensions: patterns: - "Microsoft.Extensions*" + exclude-patterns: + - "Microsoft.Extensions.AI*" + ExtensionsAI: + patterns: + - "Microsoft.Extensions.AI*" Web: patterns: - "Microsoft.AspNetCore*" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 564672f..ab80b8e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,15 +66,14 @@ jobs: fetch-depth: 0 - name: โš™ dotnet - uses: ./.github/actions/dotnet + uses: devlooped/actions-dotnet-env@v1 - name: ๐Ÿ™ build run: dotnet build -m:1 -bl:build.binlog - name: ๐Ÿงช test - run: | - dotnet tool update -g dotnet-retest - dotnet retest -- --no-build + shell: pwsh + run: dnx --yes retest -- --no-build - name: ๐Ÿ› logs uses: actions/upload-artifact@v4 @@ -101,12 +100,7 @@ jobs: fetch-depth: 0 - name: โš™ dotnet - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - 6.x - 8.x - 9.x + uses: devlooped/actions-dotnet-env@v1 - name: โœ“ ensure format run: | diff --git a/.github/workflows/dotnet-env.yml b/.github/workflows/dotnet-env.yml new file mode 100644 index 0000000..a76d0fd --- /dev/null +++ b/.github/workflows/dotnet-env.yml @@ -0,0 +1,44 @@ +name: dotnet-env +on: + workflow_dispatch: + push: + branches: + - main + paths: + - '**/*.*proj' + +jobs: + which-dotnet: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: ๐Ÿค– defaults + uses: devlooped/actions-bot@v1 + with: + name: ${{ secrets.BOT_NAME }} + email: ${{ secrets.BOT_EMAIL }} + gh_token: ${{ secrets.GH_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: ๐Ÿค˜ checkout + uses: actions/checkout@v4 + with: + token: ${{ env.GH_TOKEN }} + + - name: ๐ŸคŒ dotnet + uses: devlooped/actions-which-dotnet@v1 + + - name: โœ pull request + uses: peter-evans/create-pull-request@v7 + with: + base: main + branch: which-dotnet + delete-branch: true + labels: dependencies + title: "โš™ Update dotnet versions" + body: "Update dotnet versions" + commit-message: "Update dotnet versions" + token: ${{ env.GH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/dotnet-file-core.yml b/.github/workflows/dotnet-file-core.yml index 76aa6df..824f52c 100644 --- a/.github/workflows/dotnet-file-core.yml +++ b/.github/workflows/dotnet-file-core.yml @@ -79,7 +79,7 @@ jobs: validate: false - name: โœ pull request - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@v8 with: base: main branch: dotnet-file-sync diff --git a/.github/workflows/includes.yml b/.github/workflows/includes.yml index d787ccb..fc6dbeb 100644 --- a/.github/workflows/includes.yml +++ b/.github/workflows/includes.yml @@ -5,8 +5,9 @@ on: branches: - 'main' paths: - - '**.md' + - '**.md' - '!changelog.md' + - 'osmfeula.txt' jobs: includes: @@ -31,14 +32,33 @@ jobs: - name: +Mแ includes uses: devlooped/actions-includes@v1 + - name: ๐Ÿ“ OSMF EULA + shell: pwsh + run: | + $file = "osmfeula.txt" + $props = "src/Directory.Build.props" + if (-not (test-path $file) -or -not (test-path $props)) { + exit 0 + } + + $product = dotnet msbuild $props -getproperty:Product + if (-not $product) { + write-error 'To use OSMF EULA, ensure the $(Product) property is set in Directory.props' + exit 1 + } + + ((get-content -raw $file) -replace '\$product\$',$product).trim() | set-content $file + - name: โœ pull request - uses: peter-evans/create-pull-request@v6 + uses: peter-evans/create-pull-request@v8 with: - add-paths: '**.md' + add-paths: | + **.md + *.txt base: main branch: markdown-includes delete-branch: true - labels: docs + labels: dependencies author: ${{ env.BOT_AUTHOR }} committer: ${{ env.BOT_AUTHOR }} commit-message: +Mแ includes diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4ffa001..035d811 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,15 +28,14 @@ jobs: fetch-depth: 0 - name: โš™ dotnet - uses: ./.github/actions/dotnet + uses: devlooped/actions-dotnet-env@v1 - name: ๐Ÿ™ build run: dotnet build -m:1 -bl:build.binlog - name: ๐Ÿงช test - run: | - dotnet tool update -g dotnet-retest - dotnet retest -- --no-build + shell: pwsh + run: dnx --yes retest -- --no-build - name: ๐Ÿ› logs uses: actions/upload-artifact@v4 diff --git a/.gitignore b/.gitignore index 2ac54a7..0fe79fb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ BenchmarkDotNet.Artifacts .genaiscript .idea local.settings.json +.env *.suo *.sdf diff --git a/.netconfig b/.netconfig index 470a0de..091f9a9 100644 --- a/.netconfig +++ b/.netconfig @@ -2,18 +2,18 @@ url = https://github.com/devlooped/oss [file ".editorconfig"] url = https://github.com/devlooped/oss/blob/main/.editorconfig - sha = e81ab754b366d52d92bd69b24bef1d5b1c610634 - etag = 7298c6450967975a8782b5c74f3071e1910fc59686e48f9c9d5cd7c68213cf59 + sha = a62c45934ac2952f2f5d54d8aea4a7ebc1babaff + etag = b5e919b472a52d4b522f86494f0f2c0ba74a6d9601454e20e4cbaf744317ff62 weak [file ".gitattributes"] url = https://github.com/devlooped/oss/blob/main/.gitattributes - sha = 5f92a68e302bae675b394ef343114139c075993e - etag = 338ba6d92c8d1774363396739c2be4257bfc58026f4b0fe92cb0ae4460e1eff7 + sha = 4a9aa321c4982b83c185cf8dffed181ff84667d5 + etag = 09cad18280ed04b67f7f87591e5481510df04d44c3403231b8af885664d8fd58 weak [file ".github/dependabot.yml"] url = https://github.com/devlooped/oss/blob/main/.github/dependabot.yml - sha = 917ff5486e25bec90038e7ab6d146fd82c61f846 - etag = 50bf50df5a6eeb1705baea50f4c6e06d167a89cb5a590887ff939bd4120bd442 + sha = e733294084fb3e75d517a2e961e87df8faae7dc6 + etag = 3bf8d9214a15c049ca5cfe80d212a8cbe4753b8a638a9804ef73d34c7def9618 weak [file ".github/release.yml"] url = https://github.com/devlooped/oss/blob/main/.github/release.yml @@ -22,8 +22,8 @@ weak [file ".github/workflows/build.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml - sha = 08c70776943839f73dbea2e65355108747468508 - etag = fb2e91cdc9fb7a4d3e8f698e525816c5d8febb35b005c278eecca8056e78f809 + sha = 7f5f9ee9f362f7e8f951d618f8f799033550e687 + etag = a04ce46114292f5c0e76bc1f260381b174c93d6f264749dfacbfc892238bec73 weak [file ".github/workflows/changelog.config"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.config @@ -47,23 +47,23 @@ weak [file ".github/workflows/includes.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml - sha = 85829f2510f335f4a411867f3dbaaa116c3ab3de - etag = 086f6b6316cc6ea7089c0dcc6980be519e6ed6e6201e65042ef41b82634ec0ee + sha = 06628725a6303bb8c4cf3076a384fc982a91bc0b + etag = 478f91d4126230e57cc601382da1ba23f9daa054645b4af89800d8dd862e64fd weak [file ".github/workflows/publish.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml - sha = 08c70776943839f73dbea2e65355108747468508 - etag = 722a2c7cb3a42bc24ca7fb48d2e9a336641ed0599418239e24efbafccf64bd50 + sha = 7f5f9ee9f362f7e8f951d618f8f799033550e687 + etag = c60411d1aa4e98e7f69e2d34cbccb8eb7e387ec11f6f8e78ee8d8b92122d7025 weak [file ".gitignore"] url = https://github.com/devlooped/oss/blob/main/.gitignore - sha = e0be248fff1d39133345283b8227372b36574b75 - etag = c449ec6f76803e1891357ca2b8b4fcb5b2e5deeff8311622fd92ca9fbf1e6575 + sha = 3776526342afb3f57da7e80f2095e5fdca3c31c9 + etag = 11767f73556aa4c6c8bcc153b77ee8e8114f99fa3b885b0a7d66d082f91e77b3 weak [file ".netconfig"] url = https://github.com/devlooped/oss/blob/main/.netconfig - sha = b84f84a2429b41805d18e022c57dd8542a1ab6be - etag = 212908ebd75f6a4f810bf07ea291c2439066863d4a7e61257b7cb552775dffe8 + sha = 4cb47653344b9672c9e1754e02a3ad62ee251790 + etag = 75e0ecd751441f7ce889aa71c9c97f479b606e64b412438ee772b64cd66cb47f weak [file "Directory.Build.rsp"] url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp @@ -72,8 +72,8 @@ weak [file "_config.yml"] url = https://github.com/devlooped/oss/blob/main/_config.yml - sha = fa83a5161ba52bc5d510ce0ba75ee0b1f8d4bc63 - etag = 9139148f845adf503fd3c3c140eb64421fc476a1f9c027fc50825c0efb05f557 + sha = 68b409c486842062e0de0e5b11e6fdb7cd12d6e2 + etag = d608aa0ddaedc2d8a87260f50756e8d8314964ad4671b76bd085bcb458757010 weak [file "assets/css/style.scss"] url = https://github.com/devlooped/oss/blob/main/assets/css/style.scss @@ -89,13 +89,13 @@ skip [file "src/Directory.Build.props"] url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props - sha = 2fff747a9673b499c99f2da183cdd5263fdc9333 - etag = 0fccddf04f282fe98122ab2610dc2972c205a521254559bf013655c6271b0017 + sha = 0ff8b7b79a82112678326d1dc5543ed890311366 + etag = 3ebde0a8630d526b80f15801179116e17a857ff880a4442e7db7b075efa4fd63 weak [file "src/Directory.Build.targets"] url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets - sha = a8b208093599263b7f2d1fe3854634c588ea5199 - etag = 19087699f05396205e6b050d999a43b175bd242f6e8fac86f6df936310178b03 + sha = 4339749ef4b8f66def75931df09ef99c149f8421 + etag = 8b4492765755c030c4c351e058a92f53ab493cab440c1c0ef431f6635c4dae0e weak [file "src/kzu.snk"] url = https://github.com/devlooped/oss/blob/main/src/kzu.snk @@ -112,11 +112,16 @@ weak [file ".github/workflows/dotnet-file-core.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file-core.yml - sha = af171b7a87382ee665ba6fbaeb5f38a3551e1c23 - etag = 5ce370f52933ab2a4cd50f2b410e842fc5eab23088db2bf98b6c4d4ccdc9022b + sha = d00364faaa84c414b868c0758b9e1a5fc0520dcc + etag = d3b7d8ca69e6d22066a2348f02b409e2d6fb900f5039f68940c14e4ce6021826 weak [file ".github/workflows/triage.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/triage.yml sha = 33000c0c4ab4eb4e0e142fa54515b811a189d55c etag = 013a47739e348f06891f37c45164478cca149854e6cd5c5158e6f073f852b61a weak +[file ".github/workflows/dotnet-env.yml"] + url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-env.yml + sha = 77e83f238196d2723640abef0c7b6f43994f9747 + etag = fcb9759a96966df40dcd24906fd328ddec05953b7e747a6bb8d0d1e4c3865274 + weak diff --git a/_config.yml b/_config.yml index a61f7e0..04e6093 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,3 @@ theme: jekyll-theme-slate -exclude: [ 'src/', '*.sln', 'Gemfile*', '*.rsp' ] \ No newline at end of file +exclude: [ 'src/', '*.sln', '*.slnx', 'Gemfile*', '*.rsp' ] diff --git a/src/Directory.Build.props b/src/Directory.Build.props index b0b9d94..29281ee 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,4 +1,4 @@ - + @@ -20,6 +20,7 @@ Daniel Cazzulino + Devlooped Copyright (C) Daniel Cazzulino and Contributors. All rights reserved. false MIT @@ -42,6 +43,10 @@ true + + false + + true @@ -126,11 +131,22 @@ <_VersionLabel>$(_VersionLabel.Replace('/merge', '')) <_VersionLabel>$(_VersionLabel.Replace('/', '-')) + + <_VersionLabel>$(_VersionLabel.Replace('_', '-')) $(_VersionLabel) $(_VersionLabel) + + + true + 42.42.0 + $(VersionSuffix).$(GITHUB_RUN_NUMBER) diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 6232750..083afa6 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -165,6 +165,9 @@ @(_GitSourceRoot) + + $([System.IO.Path]::GetFileNameWithoutExtension($(PrivateRepositoryUrl))) + $(ProductFromUrl) @@ -175,9 +178,9 @@ Condition="'$(SourceControlInformationFeatureSupported)' == 'true' And '$(IsPackable)' == 'true'"> - $(RepositoryUrl) + $(RepositoryUrl.Replace('.git', '')) $(Description) - $(RepositoryUrl)/blob/main/changelog.md + $(RepositoryUrl.Replace('.git', ''))/blob/main/changelog.md