File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,17 @@ jobs:
3434 run : dotnet test --no-build --verbosity normal
3535 - name : Pack
3636 run : dotnet pack -c Release /p:BuildNumber=${{ github.run_number }}
37- - name : Ensure package versions match
37+ - name : Ensure package and template versions match
38+ shell : bash
3839 run : |
3940 ls ./artifacts/*.nupkg
40- version=$(unzip -p ./artifacts/*SDK*.nupkg '*.nuspec' | grep -oPm1 "(?<=<version>)[^<]+")
41- echo "Version: $version"
42-
41+ version=$(unzip -p ./artifacts/*SDK*.nupkg '*.nuspec' | grep -oPm1 "(?<=<version>)[^<]+" | grep -oE "^[0-9]+\.[0-9]+\.[0-9]+-preview")
42+ template_version=$(grep -oPm1 "(?<=Version=\")[^\"]+" ./templates/content/wasi-cli/wasi-cli.csproj | grep -oE "^[0-9]+\.[0-9]+\.[0-9]+-preview")
43+ echo "Package Version: $version | Template version: $template_version"
44+ if [ "$version" != "$template_version" ]; then
45+ echo "Version mismatch: Package version ($version) does not match template version ($template_version)";
46+ exit 1;
47+ fi
4348 - name : Test Template
4449 shell : bash
4550 run : |
You can’t perform that action at this time.
0 commit comments