From 277f980f2004f2659f736eb7e8fc198fc698804e Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 22 Feb 2022 11:17:43 -0300 Subject: [PATCH 1/5] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20files=20with=20?= =?UTF-8?q?dotnet-file=20sync?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/.github_changelog_generator | 9 +++ .github/workflows/build.yml | 52 ++++++++++------ .github/workflows/changelog.yml | 15 +++-- .github/workflows/dotnet-file.yml | 61 +++++++++++++++++++ .github/workflows/pages.yml | 44 -------------- .github/workflows/publish.yml | 25 +++++--- .github/workflows/release-artifacts.yml | 17 +++--- .github/workflows/release-notes.yml | 21 ++++--- .github/workflows/test/action.yml | 34 +++++++++++ .github_changelog_generator | 4 -- .gitignore | 5 +- .netconfig | 79 +++++++++++++++++------- Gemfile | 3 - assets/css/style.scss | 11 +++- assets/images/sponsors.svg | 4 +- src/Directory.Build.props | 60 ++++++++++-------- src/Directory.Build.targets | 81 ++++++++++++++++++++++--- src/nuget.config | 18 ++++++ 18 files changed, 385 insertions(+), 158 deletions(-) create mode 100644 .github/.github_changelog_generator create mode 100644 .github/workflows/dotnet-file.yml delete mode 100644 .github/workflows/pages.yml create mode 100644 .github/workflows/test/action.yml delete mode 100644 .github_changelog_generator delete mode 100644 Gemfile create mode 100644 src/nuget.config diff --git a/.github/.github_changelog_generator b/.github/.github_changelog_generator new file mode 100644 index 00000000..2d4d913c --- /dev/null +++ b/.github/.github_changelog_generator @@ -0,0 +1,9 @@ +usernames-as-github-logins=true +issues_wo_labels=true +pr_wo_labels=true +exclude-labels=bydesign,dependencies,duplicate,question,invalid,wontfix,need info +enhancement-label=:sparkles: Implemented enhancements: +bugs-label=:bug: Fixed bugs: +issues-label=:hammer: Other: +pr-label=:twisted_rightwards_arrows: Merged: +unreleased=false diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd06958c..4693754c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,8 +3,14 @@ name: build on: + workflow_dispatch: push: branches: [ main, dev, 'feature/*', 'rel/*' ] + paths-ignore: + - changelog.md + - code-of-conduct.md + - security.md + - support.md pull_request: types: [opened, synchronize, reopened] @@ -21,10 +27,19 @@ jobs: steps: - name: ๐Ÿค˜ checkout uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + + - name: โš™ dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + - name: โœ“ ensure format run: | - dotnet tool update -g dotnet-format --version 5.0.* --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json - dotnet format --check -v:diag + dotnet restore + dotnet format --verify-no-changes -v:diag build: name: build-${{ matrix.os }} @@ -32,7 +47,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [windows-latest, ubuntu-latest, macOS-latest] steps: - name: ๐Ÿค˜ checkout uses: actions/checkout@v2 @@ -40,29 +55,32 @@ jobs: submodules: recursive fetch-depth: 0 + - name: โš™ dotnet + uses: actions/setup-dotnet@v1 + if: matrix.os != 'windows-latest' + with: + dotnet-version: '6.0.x' + - name: ๐Ÿ™ build - run: dotnet build -m:1 -bl:build.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/} + run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" + + - name: โš™ GNU grep + if: matrix.os == 'macOS-latest' + run: | + brew install grep + echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile - name: ๐Ÿงช test - run: dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m -d $GITHUB_WORKSPACE/logs/${{ matrix.os }}.txt -r $GITHUB_WORKSPACE/logs + uses: ./.github/workflows/test - name: ๐Ÿ“ฆ pack - run: dotnet pack -m:1 -bl:pack.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/} + run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" - - name: ๐Ÿ”ผ logs - if: always() - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.os }} - path: | - **/*.binlog - logs/**/*.* - # Only push CI package to sleet feed if building on ubuntu (fastest) - name: ๐Ÿš€ sleet env: SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }} if: matrix.os == 'ubuntu-latest' && env.SLEET_CONNECTION != '' run: | - dotnet tool install -g --version 3.2.0 sleet - sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" + dotnet tool install -g --version 4.0.18 sleet + sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found" diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 5bf5c0d5..b535f6ec 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -2,6 +2,7 @@ on: release: types: [released] + workflow_dispatch: env: GH_TOKEN: ${{ secrets.GH_TOKEN }} @@ -23,15 +24,19 @@ jobs: ref: main token: ${{ env.GH_TOKEN }} - - name: โš™ changelog - uses: faberNovel/github-changelog-generator-action@master + - name: โš™ ruby + uses: ruby/setup-ruby@v1 with: - options: --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md + ruby-version: 3.0.3 + + - name: โš™ changelog + run: | + gem install github_changelog_generator + github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator - name: ๐Ÿš€ changelog run: | git config --local user.name github-actions git config --local user.email github-actions@github.com git add changelog.md - git commit -m "๐Ÿ–‰ Update changelog with ${GITHUB_REF#refs/*/}" - git push \ No newline at end of file + (git commit -m "๐Ÿ–‰ Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done" diff --git a/.github/workflows/dotnet-file.yml b/.github/workflows/dotnet-file.yml new file mode 100644 index 00000000..154544f3 --- /dev/null +++ b/.github/workflows/dotnet-file.yml @@ -0,0 +1,61 @@ +๏ปฟ# Synchronizes .netconfig-configured files with dotnet-file +name: dotnet-file +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + push: + branches: [ 'dotnet-file' ] + +env: + DOTNET_NOLOGO: true + GH_TOKEN: ${{ secrets.GH_TOKEN }} + +jobs: + sync: + runs-on: windows-latest + steps: + - name: ๐Ÿ” GH_TOKEN + if: env.GH_TOKEN == '' + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV + + - name: ๐Ÿค˜ checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: main + token: ${{ env.GH_TOKEN }} + + - name: ๐Ÿ”„ sync + run: | + dotnet tool update -g dotnet-gcm + dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN + gh auth status + + dotnet tool update -g dotnet-file + dotnet file sync -c:$env:TEMP\dotnet-file.md + if (test-path $env:TEMP\dotnet-file.md) { + echo 'CHANGES<> $env:GITHUB_ENV + cat $env:TEMP\dotnet-file.md >> $env:GITHUB_ENV + echo 'EOF' >> $env:GITHUB_ENV + cat $env:TEMP\dotnet-file.md + } else { + echo 'No changelog was generated' + } + + - name: โœ pull request + uses: peter-evans/create-pull-request@v3 + with: + base: main + branch: dotnet-file-sync + delete-branch: true + labels: dependencies + commit-message: โฌ†๏ธ Bump files with dotnet-file sync + + ${{ env.CHANGES }} + title: "Bump files with dotnet-file sync" + body: ${{ env.CHANGES }} + token: ${{ env.GH_TOKEN }} diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml deleted file mode 100644 index eea56019..00000000 --- a/.github/workflows/pages.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: pages -on: - push: - branches: - - main - - pages - -jobs: - gh-pages: - runs-on: ubuntu-latest - steps: - - name: ๐Ÿค˜ checkout - uses: actions/checkout@v2 - - - name: โš™ jekyll - run: | - sudo gem install bundler - bundle install - - - name: ๐Ÿ–‰ repo - run: echo "REPOSITORY=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV - - - name: ๐Ÿ™ build - run: bundle exec jekyll build -b ${{ env.REPOSITORY }} - env: - JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: โœ“ commit - run: | - cd _site - git init - git add -A - git config --local user.email "hello@clarius.org" - git config --local user.name "GitHub Action" - git commit -m "Publish pages from ${GITHUB_REPOSITORY}@${GITHUB_SHA:0:9}" - - - name: ๐Ÿš€ push - uses: ad-m/github-push-action@v0.6.0 - with: - github_token: ${{ secrets.CLARIUS_ACCESS_TOKEN }} - repository: clarius/${{ env.REPOSITORY }} - branch: gh-pages - force: true - directory: ./_site \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f1e48671..1bd977f1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,21 +20,26 @@ jobs: with: submodules: recursive fetch-depth: 0 - + + - name: โš™ dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + - name: ๐Ÿ™ build - run: dotnet build -m:1 -bl:build.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/} + run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v} + + - name: โš™ GNU grep + if: matrix.os == 'macOS-latest' + run: | + brew install grep + echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile - name: ๐Ÿงช test - run: dotnet test --no-build -m:1 + uses: ./.github/workflows/test - name: ๐Ÿ“ฆ pack - run: dotnet pack -m:1 -bl:pack.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/} - - - name: ๐Ÿ”ผ logs - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - path: '**/*.binlog' + run: dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v} - name: ๐Ÿš€ nuget run: dotnet nuget push ./bin/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index 9f965268..617bcfe2 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -19,20 +19,19 @@ jobs: - name: ๐Ÿท current run: echo "CURRENT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: โš™ dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + - name: ๐Ÿ™ build - run: dotnet build -m:1 -bl:build.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/} + run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v} - name: ๐Ÿงช test - run: dotnet test --no-build -m:1 + uses: ./.github/workflows/test - name: ๐Ÿ“ฆ pack - run: dotnet pack -m:1 -bl:pack.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/} - - - name: ๐Ÿ”ผ logs - if: ${{ always() }} - uses: actions/upload-artifact@v2 - with: - path: '**/*.binlog' + run: dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v} - name: ๐Ÿ”ฝ gh run: | diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 4ece0a43..b3ab8eef 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -20,17 +20,22 @@ jobs: - name: ๐Ÿท since run: echo "SINCE_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" >> $GITHUB_ENV + - name: โš™ ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0.3 + - name: โš™ changelog - uses: faberNovel/github-changelog-generator-action@master if: env.SINCE_TAG != '' - with: - options: --token ${{ secrets.GITHUB_TOKEN }} --since-tag ${{ env.SINCE_TAG }} --o changelog.md + run: | + gem install github_changelog_generator + github_changelog_generator --since-tag ${{ env.SINCE_TAG }} --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator - name: โš™ changelog - uses: faberNovel/github-changelog-generator-action@master if: env.SINCE_TAG == '' - with: - options: --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md + run: | + gem install github_changelog_generator + github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator - name: ๐Ÿ–‰ release shell: pwsh @@ -42,7 +47,7 @@ jobs: ConvertFrom-Json | select -ExpandProperty id - $notes = (Get-Content .\changelog.md | where { !($_ -like '\*') } | %{ $_.replace('\#', '\\#') }) -join '\n' + $notes = (Get-Content .\changelog.md | where { !($_ -like '\*') } | %{ $_.replace('\', '\\').replace('"', "'").replace('undefined', 'un-defined') }) -join '\n' $headers = @{ 'Accept'='application/vnd.github.v3+json;charset=utf-8'; 'Authorization' = "bearer $env:GITHUB_TOKEN" } $body = '{ "body":"' + $notes + '" }' @@ -53,4 +58,4 @@ jobs: iwr -Body $body "$env:GITHUB_API_URL/repos/$env:GITHUB_REPOSITORY/releases/$id" -Method PATCH -Headers $headers | select -ExpandProperty Content | ConvertFrom-Json | - ConvertTo-Json \ No newline at end of file + ConvertTo-Json diff --git a/.github/workflows/test/action.yml b/.github/workflows/test/action.yml new file mode 100644 index 00000000..9413a3d5 --- /dev/null +++ b/.github/workflows/test/action.yml @@ -0,0 +1,34 @@ +name: test +description: runs dotnet tests with retry +runs: + using: "composite" + steps: + - name: ๐Ÿงช test + shell: bash --noprofile --norc {0} + env: + LC_ALL: en_US.utf8 + run: | + [ -f .bash_profile ] && source .bash_profile + counter=0 + exitcode=0 + reset="\e[0m" + warn="\e[0;33m" + while [ $counter -lt 6 ] + do + if [ $filter ] + then + echo -e "${warn}Retry $counter for $filter ${reset}" + fi + # run test and forward output also to a file in addition to stdout (tee command) + dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m --filter=$filter | tee ./output.log + # capture dotnet test exit status, different from tee + exitcode=${PIPESTATUS[0]} + if [ $exitcode == 0 ] + then + exit 0 + fi + # cat output, get failed test names, join as DisplayName=TEST with |, remove trailing |. + filter=$(cat ./output.log | grep -o -P '(?<=\sFailed\s)\w*' | awk 'BEGIN { ORS="|" } { print("DisplayName=" $0) }' | grep -o -P '.*(?=\|$)') + ((counter++)) + done + exit $exitcode diff --git a/.github_changelog_generator b/.github_changelog_generator deleted file mode 100644 index 955932c7..00000000 --- a/.github_changelog_generator +++ /dev/null @@ -1,4 +0,0 @@ -usernames-as-github-logins=true -header-label= -add_issues_wo_labels=false -exclude-labels=dependencies,duplicate,question,invalid,wontfix \ No newline at end of file diff --git a/.gitignore b/.gitignore index 043c7d4c..dbdcc9e9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ bin obj artifacts pack +TestResults .vs .vscode @@ -15,6 +16,8 @@ pack *.cache *.binlog *.zip +__azurite*.* +__*__ .nuget *.lock.json @@ -26,4 +29,4 @@ _site .jekyll-metadata .jekyll-cache Gemfile.lock -package-lock.json \ No newline at end of file +package-lock.json diff --git a/.netconfig b/.netconfig index dc14d380..b5ed452c 100644 --- a/.netconfig +++ b/.netconfig @@ -14,111 +14,144 @@ url = https://github.com/devlooped/oss/blob/main/.editorconfig etag = 985aa022503959d35b03c870f07ae604cead7580d260775235ef6665aa9a6cbe weak + sha = 0683ee777d7d878d4bf013d7deea352685135a05 [file ".gitattributes"] url = https://github.com/devlooped/oss/blob/main/.gitattributes etag = 7acb32f5fa6d4ccd9c824605a7c2b8538497f0068c165567807d393dcf4d6bb7 weak + sha = 0683ee777d7d878d4bf013d7deea352685135a05 [file ".github/FUNDING.yml"] url = https://github.com/devlooped/oss/blob/main/.github/FUNDING.yml etag = f4d02805592d1f86c29acc9da3a40e817fb3611d6ff0f6409f547137f38f65df weak + sha = 4c91539ec08a3f9c14ff1e8c6a7c4ae88795f5f1 [file ".github/ISSUE_TEMPLATE/bug.md"] url = https://github.com/devlooped/oss/blob/main/.github/ISSUE_TEMPLATE/bug.md etag = 026852ba1f1921f3a043bb5e09cd7a2c3d9a33ec51f48e524dc3a2ab72de3141 weak + sha = 0683ee777d7d878d4bf013d7deea352685135a05 [file ".github/dependabot.yml"] url = https://github.com/devlooped/oss/blob/main/.github/dependabot.yml etag = 2fc8a0d2b47091b058ae3e1f68333492044b49a684621f4939a0bce5bff869d5 weak + sha = 0683ee777d7d878d4bf013d7deea352685135a05 [file ".github/workflows/build.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml - etag = 337666cc9f17f0cf395df950370967381f6de5134cc215f61035d36f38fed3a3 - weak -[file ".github_changelog_generator"] - url = https://github.com/devlooped/oss/blob/main/.github_changelog_generator - etag = a724e0cbbad99a04e6cd3738a5f3ec5416dd5f29ae7073e7afe5471e73107e42 + etag = d367217e2a558de214ff254604b9167e4304c2234e120ce55de15dbcf5835edf weak + sha = 445239bc82e697bf2d963a2b27fb1478b4ed2090 [file ".gitignore"] url = https://github.com/devlooped/oss/blob/main/.gitignore - etag = 925782b685859e07040442303b411bebd1c75b4fe4e075f547e067f33f323814 + etag = 2b49512f81b6cb44c4ee398975c0edf41bfa4137857b59770805fa7c5e49e94b weak + sha = 978c71c6afd095eaba35097fd7deed44fa09aa91 [file "license.txt"] url = https://github.com/devlooped/oss/blob/main/license.txt etag = 2c6335b37e4ae05eea7c01f5d0c9d82b49c488f868a8b5ba7bff7c6ff01f3994 weak + sha = 0683ee777d7d878d4bf013d7deea352685135a05 [file "security.md"] url = https://github.com/devlooped/oss/blob/main/security.md etag = fc8101fd914820db3e6b42d608dc46aefbc60c830ac721ed3917daead3727dbd weak + sha = a0f58a6d63e48ae6e55944c556d0bc94476dc8df [file "src/Directory.Build.props"] url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props - etag = 16762b7a7fbdc00c1912c469962131c912856115826db7628167517eea918324 + etag = 819e24ed16c1257f3c6ea3c728e1507020bacf32aeb63f5dd56f9a5cb2652275 weak + sha = 2fea462dc563923800a7efad24a52aa0541a8864 [file "src/Directory.Build.targets"] url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets - etag = f90be354c63f82bcfac68246648aee9a5a2842f1e4b66421b850939635610532 + etag = 87c4dff4b44072c6825b451957af6d920616d77c50152a7d99719151c3d24639 weak + sha = 4f57ffe1d48addf16641934e7b1e47ef70204e6e [file "src/kzu.snk"] url = https://github.com/devlooped/oss/blob/main/src/kzu.snk etag = b8d789b5b6bea017cdcc8badcea888ad78de3e34298efca922054e9fb0e7b6b9 weak + sha = 0683ee777d7d878d4bf013d7deea352685135a05 [file "code-of-conduct.md"] url = https://github.com/devlooped/oss/blob/main/code-of-conduct.md etag = 4857c01bb695f09bf6912d778951c3065d9dd565e5de3d0827f40432d0e4c613 weak + sha = f72699c9d52f02e6a3411ef589f2a02007c5e5af [file ".netconfig"] url = https://github.com/devlooped/oss/blob/main/.netconfig - etag = de6ab2af21c499acea76d4a4502dd9eea0dac9133345ce18b69236d1d6d8c7ae + etag = 8a099aba5d184f06c100e96da1f81df591e2d6418cb347f71ef232eaba60efc3 weak + sha = 1f4d8ed2b3b314fd6177c6a0bb1a8c5c6be10044 [file "Directory.Build.rsp"] url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp etag = 6a6c6e1d3895df953abf14c82b0899e3eea75cdcd679f6212dcfea15183d73d6 weak + sha = ae25fae9d7daf0cb47d537ba870914aa3052f0c9 [file "_config.yml"] url = https://github.com/devlooped/oss/blob/main/_config.yml etag = 9139148f845adf503fd3c3c140eb64421fc476a1f9c027fc50825c0efb05f557 weak + sha = fa83a5161ba52bc5d510ce0ba75ee0b1f8d4bc63 [file ".github/ISSUE_TEMPLATE/config.yml"] url = https://github.com/devlooped/oss/blob/main/.github/ISSUE_TEMPLATE/config.yml etag = b5ce64e6967276086eb89f86f57364da9c4deac988c7e0e04810a4f8caaa1400 weak -[file ".github/workflows/pages.yml"] - url = https://github.com/devlooped/oss/blob/main/.github/workflows/pages.yml - etag = f2bc91354dc634de00aa9f502eb69e34368c315bcdbe422cde95ddd850d31669 - weak -[file "Gemfile"] - url = https://github.com/devlooped/oss/blob/main/Gemfile - etag = d45832acd078778ffebf260000f6d25172a131f51684744d7e982da2a47170ce - weak + sha = 6f1ed274e1e168da487affb88d69774fc2f926c3 [file "assets/css/style.scss"] url = https://github.com/devlooped/oss/blob/main/assets/css/style.scss - etag = 2c86a074a6c8c2f6af806908a57215439fad563830b4af8fbed1a3aabaede0cf + etag = f710d8919abfd5a8d00050b74ba7d0bb05c6d02e40842a3012eb96555c208504 weak + sha = 9db26e2710b084d219d6355339d822f159bf5780 [file "assets/images/sponsors.png"] url = https://github.com/devlooped/oss/blob/main/assets/images/sponsors.png etag = f152d1038eb04cb1596a13377b032f18f2402c969130601384fb377ce5ddefbd weak + sha = bf7b4569981b558b130bdd3ce93043d624a567d8 [file "assets/images/sponsors.svg"] url = https://github.com/devlooped/oss/blob/main/assets/images/sponsors.svg - etag = 182780a2d68bdba9069000aef75712ab81c307eee1317bcd29d35563f523ba98 + etag = d545e385f5b7db32d12a15905e0173246953cc0efdce0595a67cf9544e0a4fed weak + sha = 491c6ee4ed880dc92012dee9b1c4e7d3e9d14115 [file "support.md"] url = https://github.com/devlooped/oss/blob/main/support.md etag = 2d47e2fc4fdfa3515203d452674566e3df507461f9938f451a06d79deb687d24 weak + sha = a0f58a6d63e48ae6e55944c556d0bc94476dc8df [file ".github/workflows/changelog.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.yml - etag = 7f5bb52dff2908e4a4b60e06b4f8f1d497864554076f916aa6e5e8c9b2c6b2d2 + etag = 202803313c2792cb09d9cb8041fe4b39e550e26c90971a57b92534c599a596a7 weak + sha = be8f625e4cf5c2c572c7e56ba6dc4c4935ab0c00 [file ".github/workflows/publish.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml - etag = 8067230717247263ad661c69780fdfdf4b6f140287517fee9c5d4e64d4b737af + etag = 242bd273906e0cbef773b5a0696f6dccf304d044a659b68e75ede5b1f5ea94fe weak + sha = 7ebebbdbab67d9d895a29b3d2b3f82a62a7d8c4e [file ".github/workflows/release-artifacts.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/release-artifacts.yml - etag = 8be10a2fbeb9e6924d8b08e58a61a0f69138352c6f5477b53dcd34c26d8d35ef + etag = a22b19d3d694b2c6613ce01903a54df9324fecf62558958e677bb4d60f3a6ba4 weak + sha = 7ebebbdbab67d9d895a29b3d2b3f82a62a7d8c4e [file ".github/workflows/release-notes.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/release-notes.yml - etag = e997e6e7bfd4d850a3554d4232562075a89cf7713a8cec4aef483f2bd6f3c10a + etag = d1de9cb9c403ed8632d22d4cc153ae63b075266b9ce638b9ac73fd47dd2bccc1 + weak + sha = be8f625e4cf5c2c572c7e56ba6dc4c4935ab0c00 +[file ".github/.github_changelog_generator"] + url = https://github.com/devlooped/oss/blob/main/.github/.github_changelog_generator + sha = b7ce2bedba3fe467b8bc252c372cd36bbde259a5 + etag = 28145d505ce95b57628ab368bb12744300d5f539d3651c346e3c0c3f772ffa7b + weak +[file ".github/workflows/dotnet-file.yml"] + url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file.yml + sha = 2a39a426f66402e47c80818f92748a1bfd7d736c + etag = c424e4f9159bd5d4ccb3b65646a65eed5ad153f57111e3b56900ebce10194f3f + weak +[file ".github/workflows/test/action.yml"] + url = https://github.com/devlooped/oss/blob/main/.github/workflows/test/action.yml + sha = 3b9f317fc4f3edb926b26c4e4db9773a5f95ebca + etag = cf89aeff5c66fd3c0d0aaa655b527d66f5e823413c7a6788a62542e93d344576 + weak +[file "src/nuget.config"] + url = https://github.com/devlooped/oss/blob/main/src/nuget.config + sha = 7d0ccab53c166b87b971040f25de06570821f8ac + etag = 0ef58051c4db505e16b39954b27ab9e7a903647998b959e0924634d5f01824dd weak diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 025f43f7..00000000 --- a/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gem 'github-pages', '~> 209', group: :jekyll_plugins \ No newline at end of file diff --git a/assets/css/style.scss b/assets/css/style.scss index f83369cc..5e165a3c 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -14,4 +14,13 @@ pre, code { code { font-size: 0.80em; -} \ No newline at end of file +} + +h1 > img { + border: unset; + box-shadow: unset; + vertical-align: middle; + -moz-box-shadow: unset; + -o-box-shadow: unset; + -ms-box-shadow: unset; +} diff --git a/assets/images/sponsors.svg b/assets/images/sponsors.svg index 1a1d80fe..08d31233 100644 --- a/assets/images/sponsors.svg +++ b/assets/images/sponsors.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f3523ae4..5976dd67 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -19,11 +19,17 @@ - kzu + Daniel Cazzulino Copyright (C) Daniel Cazzulino and Contributors. All rights reserved. false MIT - icon.png + + + icon.png + readme.md + + icon.png + readme.md true true @@ -32,20 +38,16 @@ true - - https://pkg.kzu.io/index.json;https://api.nuget.org/v3/index.json;$(RestoreSources) - + https://api.nuget.org/v3/index.json;https://pkg.kzu.io/index.json;$(RestoreSources) - - - - + + true + Release + true + false Latest @@ -63,18 +65,6 @@ $(DefaultItemExcludes);*.binlog;*.zip;*.rsp;*.items;**/TestResults/**/*.* - - $(MSBuildThisFileDirectory)kzu.snk - - 002400000480000094000000060200000024000052534131000400000100010051155fd0ee280be78d81cc979423f1129ec5dd28edce9cd94fd679890639cad54c121ebdb606f8659659cd313d3b3db7fa41e2271158dd602bb0039a142717117fa1f63d93a2d288a1c2f920ec05c4858d344a45d48ebd31c1368ab783596b382b611d8c92f9c1b3d338296aa21b12f3bc9f34de87756100c172c52a24bad2db - 00352124762f2aa5 - true - true true true @@ -90,6 +80,26 @@ NU5105;$(NoWarn) true + + + true + + + LatestMinor + + + + + $(MSBuildThisFileDirectory)kzu.snk + + 002400000480000094000000060200000024000052534131000400000100010051155fd0ee280be78d81cc979423f1129ec5dd28edce9cd94fd679890639cad54c121ebdb606f8659659cd313d3b3db7fa41e2271158dd602bb0039a142717117fa1f63d93a2d288a1c2f920ec05c4858d344a45d48ebd31c1368ab783596b382b611d8c92f9c1b3d338296aa21b12f3bc9f34de87756100c172c52a24bad2db + 00352124762f2aa5 + true @@ -120,6 +130,8 @@ + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 018b2e58..925f362e 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,6 +1,15 @@ + + CI;$(DefineConstants) + + + + true + true + + + + + + + + + + + + + @@ -33,17 +64,41 @@ $(OutputPath) - - - $(DefineConstants);$(TargetFramework.ToUpperInvariant().TrimEnd('0').TrimEnd('.').Replace('.', '')) - + + + pr$(GITHUB_REF.Replace('refs/pull/', '').Replace('/merge', '')) + $(GITHUB_REF.Replace('refs/heads/', '').Replace('refs/tags/', '')) + + $(BUILD_SOURCEBRANCH.Replace('refs/heads/', '').Replace('refs/tags/', '')) + + pr$(APPVEYOR_PULL_REQUEST_NUMBER) + $(APPVEYOR_REPO_TAG_NAME) + $(APPVEYOR_REPO_BRANCH) + + $(TEAMCITY_BUILD_BRANCH) + + pr$(TRAVIS_PULL_REQUEST) + $(TRAVIS_BRANCH) + + pr$(CIRCLE_PR_NUMBER) + $(CIRCLE_TAG) + $(CIRCLE_BRANCH) + + $(CI_COMMIT_TAG) + pr$(CI_MERGE_REQUEST_IID) + pr$(CI_EXTERNAL_PULL_REQUEST_IID) + $(CI_COMMIT_BRANCH) + + pr$(BUDDY_EXECUTION_PULL_REQUEST_NO) + $(BUDDY_EXECUTION_TAG) + $(BUDDY_EXECUTION_BRANCH) + - - + + @@ -54,8 +109,11 @@ + + + @@ -76,6 +134,15 @@ $(RepositorySha) + + + <_GitSourceRoot Include="@(SourceRoot -> WithMetadataValue('SourceControl', 'git'))" /> + + + + @(_GitSourceRoot) + + diff --git a/src/nuget.config b/src/nuget.config new file mode 100644 index 00000000..7ccee7ce --- /dev/null +++ b/src/nuget.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file From 4354e3a2de874be51a2c96ffd144df2f961dc794 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 22 Feb 2022 11:44:13 -0300 Subject: [PATCH 2/5] =?UTF-8?q?=E2=9C=8F=20Apply=20formatting=20&=20fix=20?= =?UTF-8?q?warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix build warnings --- .github/workflows/build.yml | 4 +--- .netconfig | 4 ++-- src/Directory.props | 2 +- src/ThisAssembly.Metadata/HashCode.cs | 32 +++++++++++++-------------- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4693754c..938939e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,9 +37,7 @@ jobs: dotnet-version: '6.0.x' - name: โœ“ ensure format - run: | - dotnet restore - dotnet format --verify-no-changes -v:diag + run: dotnet format --verify-no-changes -v:diag --exclude ~/.nuget build: name: build-${{ matrix.os }} diff --git a/.netconfig b/.netconfig index b5ed452c..5a9ff8b8 100644 --- a/.netconfig +++ b/.netconfig @@ -37,9 +37,9 @@ sha = 0683ee777d7d878d4bf013d7deea352685135a05 [file ".github/workflows/build.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml - etag = d367217e2a558de214ff254604b9167e4304c2234e120ce55de15dbcf5835edf + etag = 6b9139f22428851c8d7329973f3d92802d25e70a5e0c1b24604c23db991ac8e2 weak - sha = 445239bc82e697bf2d963a2b27fb1478b4ed2090 + sha = bbf637b2a565073a89783c9eb4ebd9c460823fe4 [file ".gitignore"] url = https://github.com/devlooped/oss/blob/main/.gitignore etag = 2b49512f81b6cb44c4ee398975c0edf41bfa4137857b59770805fa7c5e49e94b diff --git a/src/Directory.props b/src/Directory.props index f6178114..ea61fb05 100644 --- a/src/Directory.props +++ b/src/Directory.props @@ -5,7 +5,7 @@ dotnet roslyn true analyzers/dotnet/cs - + false $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\nugetizer\bin'));$(RestoreSources) https://clarius.org/ThisAssembly diff --git a/src/ThisAssembly.Metadata/HashCode.cs b/src/ThisAssembly.Metadata/HashCode.cs index 23ae7aeb..8e6942d6 100644 --- a/src/ThisAssembly.Metadata/HashCode.cs +++ b/src/ThisAssembly.Metadata/HashCode.cs @@ -61,24 +61,24 @@ namespace ThisAssembly [ExcludeFromCodeCoverage] public struct HashCode { - private static readonly uint s_seed = (uint)new Random().Next(); + static readonly uint s_seed = (uint)new Random().Next(); - private const uint Prime1 = 2654435761U; - private const uint Prime2 = 2246822519U; - private const uint Prime3 = 3266489917U; - private const uint Prime4 = 668265263U; - private const uint Prime5 = 374761393U; + const uint Prime1 = 2654435761U; + const uint Prime2 = 2246822519U; + const uint Prime3 = 3266489917U; + const uint Prime4 = 668265263U; + const uint Prime5 = 374761393U; - private uint _v1, _v2, _v3, _v4; - private uint _queue1, _queue2, _queue3; - private uint _length; + uint _v1, _v2, _v3, _v4; + uint _queue1, _queue2, _queue3; + uint _length; [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static uint Rol(uint value, int count) + static uint Rol(uint value, int count) => (value << count) | (value >> (32 - count)); [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void Initialize(out uint v1, out uint v2, out uint v3, out uint v4) + static void Initialize(out uint v1, out uint v2, out uint v3, out uint v4) { v1 = s_seed + Prime1 + Prime2; v2 = s_seed + Prime2; @@ -87,7 +87,7 @@ private static void Initialize(out uint v1, out uint v2, out uint v3, out uint v } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static uint Round(uint hash, uint input) + static uint Round(uint hash, uint input) { hash += input * Prime2; hash = Rol(hash, 13); @@ -96,25 +96,25 @@ private static uint Round(uint hash, uint input) } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static uint QueueRound(uint hash, uint queuedValue) + static uint QueueRound(uint hash, uint queuedValue) { hash += queuedValue * Prime3; return Rol(hash, 17) * Prime4; } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static uint MixState(uint v1, uint v2, uint v3, uint v4) + static uint MixState(uint v1, uint v2, uint v3, uint v4) { return Rol(v1, 1) + Rol(v2, 7) + Rol(v3, 12) + Rol(v4, 18); } - private static uint MixEmptyState() + static uint MixEmptyState() { return s_seed + Prime5; } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static uint MixFinal(uint hash) + static uint MixFinal(uint hash) { hash ^= hash >> 15; hash *= Prime2; From 78f389f0e554b70179103101be73b1940432046e Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 22 Feb 2022 12:41:49 -0300 Subject: [PATCH 3/5] Workaround SDK 6.0.200 breakage See https://github.com/devlooped/ThisAssembly/issues/85 --- .github/workflows/build.yml | 5 ++--- .github/workflows/publish.yml | 2 +- global.json | 5 +++++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 938939e4..9f7a680d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: - name: โš™ dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: '6.0.x' + dotnet-version: '6.0.102' - name: โœ“ ensure format run: dotnet format --verify-no-changes -v:diag --exclude ~/.nuget @@ -55,9 +55,8 @@ jobs: - name: โš™ dotnet uses: actions/setup-dotnet@v1 - if: matrix.os != 'windows-latest' with: - dotnet-version: '6.0.x' + dotnet-version: '6.0.101' - name: ๐Ÿ™ build run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1bd977f1..78456a32 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,7 +24,7 @@ jobs: - name: โš™ dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: '6.0.x' + dotnet-version: '6.0.101' - name: ๐Ÿ™ build run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v} diff --git a/global.json b/global.json new file mode 100644 index 00000000..f80c9245 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "6.0.101" + } +} \ No newline at end of file From 48a33b8b46bbeed9e341f81ed70067ebe28984f3 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 22 Feb 2022 13:14:56 -0300 Subject: [PATCH 4/5] Fix tests --- src/ThisAssembly.Tests/Tests.cs | 2 +- src/ThisAssembly.Tests/ThisAssembly.Tests.csproj | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ThisAssembly.Tests/Tests.cs b/src/ThisAssembly.Tests/Tests.cs index 8fe1eb89..7d30e57f 100644 --- a/src/ThisAssembly.Tests/Tests.cs +++ b/src/ThisAssembly.Tests/Tests.cs @@ -15,7 +15,7 @@ public void CanUseFileConstants() [Fact] public void CanUseFileConstantLinkedFile() - => Assert.Equal(Path.Combine("Included", "icon.png"), ThisAssembly.Constants.Included.icon); + => Assert.Equal(Path.Combine("Included", "Readme.txt"), ThisAssembly.Constants.Included.Readme); [Fact] public void CanUseMetadata() diff --git a/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj b/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj index 238ea415..84b6177b 100644 --- a/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj +++ b/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj @@ -1,7 +1,7 @@ ๏ปฟ - net5.0 + net6.0 net472 ThisAssemblyTests true @@ -48,12 +48,12 @@ - - - Included/icon.png + + Included/%(Filename)%(Extension) + - +