diff --git a/.github/workflows/GithubActionsRelease.yml b/.github/workflows/GithubActionsRelease.yml index dfa11d6e3..15c7ca70e 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,8 @@ jobs: -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json + - 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 e1dc2ce0f..0677a0418 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,10 @@ jobs: - name: Display MaterialBlazor package output Ꙫ run: dir ${{env.outputMBMD3}} + - 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..71a13a3d0 --- /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 -Path $filePath -AsByteStream -Raw +$hash = [System.Convert]::ToBase64String($hasher.ComputeHash($content)) +Write-Output ($filePath.ToString() + ": " + $hash) \ No newline at end of file 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", 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