From 2ba238c0d850460de36b0d30f63bff1a21448d0a Mon Sep 17 00:00:00 2001 From: Mark Stega Date: Tue, 23 Jan 2024 15:10:05 -0500 Subject: [PATCH 1/7] Add new GHA yml files to 5.0.2 --- .github/workflows/GithubActionsRelease.yml | 4 ++++ .github/workflows/GithubActionsWIP.yml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/GithubActionsRelease.yml b/.github/workflows/GithubActionsRelease.yml index dfa11d6e3..10cf7c719 100644 --- a/.github/workflows/GithubActionsRelease.yml +++ b/.github/workflows/GithubActionsRelease.yml @@ -23,6 +23,7 @@ env: projectTest: 'Material.Blazor.Test/Material.Blazor.Test.csproj' projectWeb: 'Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj' + materialBlazorMD3LibModule: '"Material.Blazor.MD3/wwwroot/Material.Blazor.MD3.lib.module.js"' outputDocFxMD3: ${{github.workspace}}\siteDocFxMD3 outputMBMD3: ${{github.workspace}}\siteMBMD3 outputWebMD3: ${{github.workspace}}\siteWebMD3 @@ -404,3 +405,6 @@ jobs: -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json + - name: Compute the SHA512 hash of material.blazor.md3.lib.module.js + run: certutil -hashfile ${{env.materialBlazorMD3LibModule}} SHA512 + diff --git a/.github/workflows/GithubActionsWIP.yml b/.github/workflows/GithubActionsWIP.yml index e1dc2ce0f..d695abb22 100644 --- a/.github/workflows/GithubActionsWIP.yml +++ b/.github/workflows/GithubActionsWIP.yml @@ -17,6 +17,7 @@ env: projectTest: 'Material.Blazor.Test/Material.Blazor.Test.csproj' projectWeb: 'Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj' + materialBlazorMD3LibModule: '"Material.Blazor.MD3/wwwroot/Material.Blazor.MD3.lib.module.js"' outputDocFxMD3: ${{github.workspace}}\siteDocFxMD3 outputMBMD3: ${{github.workspace}}/siteMBMD3 outputWebMD3: ${{github.workspace}}/siteWebMD3 @@ -546,6 +547,8 @@ jobs: - name: Display MaterialBlazor package output Ꙫ run: dir ${{env.outputMBMD3}} + - name: Compute the SHA512 hash of material.blazor.md3.lib.module.js + run: certutil -hashfile ${{env.materialBlazorMD3LibModule}} SHA512 ############################################################################################################ # deployghpages-mbcurrent From 6fd77601b54cf5ee09ea387c6687338746ba5b9a Mon Sep 17 00:00:00 2001 From: Mark Stega Date: Tue, 23 Jan 2024 16:12:56 -0500 Subject: [PATCH 2/7] SHA512 -> SHA256 --- Material.Blazor.MD3/package-lock.json | 8 ++++---- Material.Blazor.MD3/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Material.Blazor.MD3/package-lock.json b/Material.Blazor.MD3/package-lock.json index 611657425..cd9e09705 100644 --- a/Material.Blazor.MD3/package-lock.json +++ b/Material.Blazor.MD3/package-lock.json @@ -16,7 +16,7 @@ "@babel/plugin-transform-runtime": "^7.23.7", "@babel/preset-env": "^7.23.8", "@babel/preset-typescript": "^7.23.3", - "@material/web": "^1.1.2-nightly.6efc904.0", + "@material/web": "^1.1.2-nightly.a3b2be8.0", "babel-loader": "^9.1.3", "fork-ts-checker-webpack-plugin": "^9.0.2", "material-components-web": "14.0.0", @@ -2679,9 +2679,9 @@ } }, "node_modules/@material/web": { - "version": "1.1.2-nightly.cef1b74.0", - "resolved": "https://registry.npmjs.org/@material/web/-/web-1.1.2-nightly.cef1b74.0.tgz", - "integrity": "sha512-pTprwiP/YHm0s/kmcL1FcXqeUjNt94KzCNFjZNuN3IDTQWpmIqSYae7RxZKPhMi9PXjlqASYXguv6Q/aR26XKA==", + "version": "1.1.2-nightly.a3b2be8.0", + "resolved": "https://registry.npmjs.org/@material/web/-/web-1.1.2-nightly.a3b2be8.0.tgz", + "integrity": "sha512-9bkVNsERX3UiJSX3V/NDGs9djK4g8kN/XiZalR+MkLLKLzL7PhtcCI3orHRnIB2DQeraw8euHDdMUdLz3JU+rg==", "dev": true, "dependencies": { "lit": "^2.7.4 || ^3.0.0", diff --git a/Material.Blazor.MD3/package.json b/Material.Blazor.MD3/package.json index c6bf163e9..e26673087 100644 --- a/Material.Blazor.MD3/package.json +++ b/Material.Blazor.MD3/package.json @@ -26,7 +26,7 @@ "@babel/plugin-transform-runtime": "^7.23.7", "@babel/preset-env": "^7.23.8", "@babel/preset-typescript": "^7.23.3", - "@material/web": "^1.1.2-nightly.6efc904.0", + "@material/web": "^1.1.2-nightly.a3b2be8.0", "babel-loader": "^9.1.3", "fork-ts-checker-webpack-plugin": "^9.0.2", "material-components-web": "14.0.0", From 06e707bc6c2c4b4ad9eb208b52dd8fbee06b0330 Mon Sep 17 00:00:00 2001 From: Mark Stega Date: Tue, 23 Jan 2024 16:35:47 -0500 Subject: [PATCH 3/7] Really change GHA scripts --- .github/workflows/GithubActionsRelease.yml | 2 +- .github/workflows/GithubActionsWIP.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/GithubActionsRelease.yml b/.github/workflows/GithubActionsRelease.yml index 10cf7c719..e8760f004 100644 --- a/.github/workflows/GithubActionsRelease.yml +++ b/.github/workflows/GithubActionsRelease.yml @@ -406,5 +406,5 @@ jobs: -s https://api.nuget.org/v3/index.json - name: Compute the SHA512 hash of material.blazor.md3.lib.module.js - run: certutil -hashfile ${{env.materialBlazorMD3LibModule}} SHA512 + run: certutil -hashfile ${{env.materialBlazorMD3LibModule}} SHA256 diff --git a/.github/workflows/GithubActionsWIP.yml b/.github/workflows/GithubActionsWIP.yml index d695abb22..e72338b92 100644 --- a/.github/workflows/GithubActionsWIP.yml +++ b/.github/workflows/GithubActionsWIP.yml @@ -548,7 +548,7 @@ jobs: run: dir ${{env.outputMBMD3}} - name: Compute the SHA512 hash of material.blazor.md3.lib.module.js - run: certutil -hashfile ${{env.materialBlazorMD3LibModule}} SHA512 + run: certutil -hashfile ${{env.materialBlazorMD3LibModule}} SHA256 ############################################################################################################ # deployghpages-mbcurrent From 45cf573feadaffd3d947787ca13852dfa64f8b30 Mon Sep 17 00:00:00 2001 From: Mark Stega Date: Wed, 24 Jan 2024 14:05:41 -0500 Subject: [PATCH 4/7] Compute base64 hash --- .github/workflows/GithubActionsRelease.yml | 6 ++++-- .github/workflows/GithubActionsWIP.yml | 6 ++++-- ComputeSHA.ps1 | 10 ++++++++++ .../Material.Blazor.Website.Server.MD3.csproj | 16 ++++++++++++++++ Material.Blazor.sln | 1 + 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 ComputeSHA.ps1 diff --git a/.github/workflows/GithubActionsRelease.yml b/.github/workflows/GithubActionsRelease.yml index e8760f004..1b95d2a87 100644 --- a/.github/workflows/GithubActionsRelease.yml +++ b/.github/workflows/GithubActionsRelease.yml @@ -405,6 +405,8 @@ jobs: -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json - - name: Compute the SHA512 hash of material.blazor.md3.lib.module.js - run: certutil -hashfile ${{env.materialBlazorMD3LibModule}} SHA256 + - name: Compute the SHA256 hash of material.blazor.md3.lib.module.js + shell: pwsh + run: | + .\computesha.ps1 ${{env.materialBlazorMD3LibModule}} diff --git a/.github/workflows/GithubActionsWIP.yml b/.github/workflows/GithubActionsWIP.yml index e72338b92..ca534d069 100644 --- a/.github/workflows/GithubActionsWIP.yml +++ b/.github/workflows/GithubActionsWIP.yml @@ -547,8 +547,10 @@ jobs: - name: Display MaterialBlazor package output Ꙫ run: dir ${{env.outputMBMD3}} - - name: Compute the SHA512 hash of material.blazor.md3.lib.module.js - run: certutil -hashfile ${{env.materialBlazorMD3LibModule}} SHA256 + - name: Compute the SHA256 hash of material.blazor.md3.lib.module.js + shell: pwsh + run: | + .\computesha.ps1 ${{env.materialBlazorMD3LibModule}} ############################################################################################################ # deployghpages-mbcurrent diff --git a/ComputeSHA.ps1 b/ComputeSHA.ps1 new file mode 100644 index 000000000..39c68d3ae --- /dev/null +++ b/ComputeSHA.ps1 @@ -0,0 +1,10 @@ +param( + [Parameter(Mandatory=$True, + ValueFromPipeline=$True)] + $filePath +) + +$hasher = [System.Security.Cryptography.SHA256]::Create() +$content = Get-Content -Encoding byte $filePath +$hash = [System.Convert]::ToBase64String($hasher.ComputeHash($content)) +Write-Output ($filePath.ToString() + ": " + $hash) \ No newline at end of file diff --git a/Material.Blazor.Website.Server.MD3/Material.Blazor.Website.Server.MD3.csproj b/Material.Blazor.Website.Server.MD3/Material.Blazor.Website.Server.MD3.csproj index baada977a..0e8a66634 100644 --- a/Material.Blazor.Website.Server.MD3/Material.Blazor.Website.Server.MD3.csproj +++ b/Material.Blazor.Website.Server.MD3/Material.Blazor.Website.Server.MD3.csproj @@ -21,4 +21,20 @@ + + + diff --git a/Material.Blazor.sln b/Material.Blazor.sln index 68464442e..4937829b5 100644 --- a/Material.Blazor.sln +++ b/Material.Blazor.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solutio .gitignore = .gitignore CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md ctag.cmd = ctag.cmd + ComputeSHA.ps1 = ComputeSHA.ps1 .github\dependabot.yml = .github\dependabot.yml Directory.Build.props = Directory.Build.props filterConfig.yml = filterConfig.yml From 2cbce08917f8747e152a1fc2f5e06dc42633d88f Mon Sep 17 00:00:00 2001 From: Mark Stega Date: Wed, 24 Jan 2024 14:34:33 -0500 Subject: [PATCH 5/7] Remove extraneous quotes --- .github/workflows/GithubActionsRelease.yml | 2 +- .github/workflows/GithubActionsWIP.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/GithubActionsRelease.yml b/.github/workflows/GithubActionsRelease.yml index 1b95d2a87..15c7ca70e 100644 --- a/.github/workflows/GithubActionsRelease.yml +++ b/.github/workflows/GithubActionsRelease.yml @@ -23,7 +23,7 @@ env: projectTest: 'Material.Blazor.Test/Material.Blazor.Test.csproj' projectWeb: 'Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj' - materialBlazorMD3LibModule: '"Material.Blazor.MD3/wwwroot/Material.Blazor.MD3.lib.module.js"' + materialBlazorMD3LibModule: 'Material.Blazor.MD3/wwwroot/Material.Blazor.MD3.lib.module.js' outputDocFxMD3: ${{github.workspace}}\siteDocFxMD3 outputMBMD3: ${{github.workspace}}\siteMBMD3 outputWebMD3: ${{github.workspace}}\siteWebMD3 diff --git a/.github/workflows/GithubActionsWIP.yml b/.github/workflows/GithubActionsWIP.yml index ca534d069..0677a0418 100644 --- a/.github/workflows/GithubActionsWIP.yml +++ b/.github/workflows/GithubActionsWIP.yml @@ -17,7 +17,7 @@ env: projectTest: 'Material.Blazor.Test/Material.Blazor.Test.csproj' projectWeb: 'Material.Blazor.Website.WebAssembly/Material.Blazor.Website.WebAssembly.csproj' - materialBlazorMD3LibModule: '"Material.Blazor.MD3/wwwroot/Material.Blazor.MD3.lib.module.js"' + materialBlazorMD3LibModule: 'Material.Blazor.MD3/wwwroot/Material.Blazor.MD3.lib.module.js' outputDocFxMD3: ${{github.workspace}}\siteDocFxMD3 outputMBMD3: ${{github.workspace}}/siteMBMD3 outputWebMD3: ${{github.workspace}}/siteWebMD3 From ec7c2f50940d7f0a3c1c0aece6e95b3c5c2c19a2 Mon Sep 17 00:00:00 2001 From: Mark Stega Date: Wed, 24 Jan 2024 15:38:05 -0500 Subject: [PATCH 6/7] Change Get-Content parameters --- ComputeSHA.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputeSHA.ps1 b/ComputeSHA.ps1 index 39c68d3ae..b394efa0c 100644 --- a/ComputeSHA.ps1 +++ b/ComputeSHA.ps1 @@ -5,6 +5,6 @@ param( ) $hasher = [System.Security.Cryptography.SHA256]::Create() -$content = Get-Content -Encoding byte $filePath +$content = Get-Content -Path $filePath $hash = [System.Convert]::ToBase64String($hasher.ComputeHash($content)) Write-Output ($filePath.ToString() + ": " + $hash) \ No newline at end of file From 1b6386666339e9c04603c5d547f5d4d2f3e9a0d4 Mon Sep 17 00:00:00 2001 From: Mark Stega Date: Wed, 24 Jan 2024 15:41:23 -0500 Subject: [PATCH 7/7] AsByteStream Raw --- ComputeSHA.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputeSHA.ps1 b/ComputeSHA.ps1 index b394efa0c..71a13a3d0 100644 --- a/ComputeSHA.ps1 +++ b/ComputeSHA.ps1 @@ -5,6 +5,6 @@ param( ) $hasher = [System.Security.Cryptography.SHA256]::Create() -$content = Get-Content -Path $filePath +$content = Get-Content -Path $filePath -AsByteStream -Raw $hash = [System.Convert]::ToBase64String($hasher.ComputeHash($content)) Write-Output ($filePath.ToString() + ": " + $hash) \ No newline at end of file