Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Sep 25, 2024
1 parent 489e3fb commit 450c422
Show file tree
Hide file tree
Showing 20 changed files with 197 additions and 65 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/admin-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cd src/Templates/Boilerplate && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage --api Standalone
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage --api Standalone --framework net9.0
- name: Update core appsettings.json
uses: devops-actions/[email protected]
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
cd src\Templates\Boilerplate && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ..\..\..\ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --windows --appInsights --appCenter --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage
cd ..\..\..\ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --windows --appInsights --appCenter --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage --framework net9.0
- name: Update core appsettings.json
uses: devops-actions/[email protected]
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
cd src/Templates/Boilerplate && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage --framework net9.0
- uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -277,7 +277,7 @@ jobs:
cd src/Templates/Boilerplate && dotnet build -c Release
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage --framework net9.0
- name: Update core appsettings.json
uses: devops-actions/[email protected]
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/bit.full.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
with:
global-json-file: src/global.json

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- uses: actions/setup-node@v4
with:
node-version: 20
Expand Down Expand Up @@ -53,15 +58,15 @@ jobs:
- name: Test SqlServer database option
run: |
dotnet new bit-bp --name TestSqlServer --database SqlServer
dotnet new bit-bp --name TestSqlServer --database SqlServer --framework net8.0
cd TestSqlServer/src/Server/TestSqlServer.Server.Api/
dotnet tool restore
dotnet ef migrations add InitialMigration
dotnet ef database update
cd ../../Tests
dotnet test
- name: Test PostgreSQL, Cosmos, MySql, Other database options
- name: Test PostgreSQL, Cosmos, Other database options
run: |
dotnet new bit-bp --name TestPostgreSQL --database PostgreSQL
cd TestPostgreSQL/src/Server/TestPostgreSQL.Server.Api/
Expand All @@ -71,10 +76,6 @@ jobs:
cd TestCosmos/src/Server/TestCosmos.Server.Api/
dotnet build
cd ../../../../
# dotnet new bit-bp --name TestMySql --database MySql
# cd TestMySql/src/Server/TestMySql.Server.Api/
# dotnet build
# cd ../../../../
dotnet new bit-bp --name TestOther --database Other
cd TestOther/src/Server/TestOther.Server.Api/
dotnet build
Expand All @@ -98,7 +99,7 @@ jobs:
cd TestStandalone.Server.Web/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestIntegrated --api Integrated
dotnet new bit-bp --name TestIntegrated --api Integrated --framework net8.0
cd TestIntegrated/src/Server/TestIntegrated.Server.Web/
dotnet build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/todo-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
echo A | xcopy .\bin\publish-x64 .\publish-result /s /e /h
echo A | xcopy .\bin\publish .\publish-result /s /e /h
dotnet tool restore
dotnet vpk pack -u TodoSample.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e TodoSample.Client.Windows-x86.exe -r win-x86 --framework net9.0.0-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle TodoSample
dotnet vpk pack -u TodoSample.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e TodoSample.Client.Windows-x86.exe -r win-x86 --framework net8.0-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle TodoSample
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jobs:
echo A | xcopy .\bin\publish-x64 .\publish-result /s /e /h
echo A | xcopy .\bin\publish .\publish-result /s /e /h
dotnet tool restore
dotnet vpk pack -u Boilerplate.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e Boilerplate.Client.Windows-x86.exe -r win-x86 --framework net9.0.0-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle 'Boilerplate'
dotnet vpk pack -u Boilerplate.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e Boilerplate.Client.Windows-x86.exe -r win-x86 --framework net9.0-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle 'Boilerplate'
- task: PublishPipelineArtifact@1
displayName: Upload artifact
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "Boilerplate",
//#if (framework == 'net9.0')
"image": "mcr.microsoft.com/dotnet/sdk:9.0",
//#else
"image": "mcr.microsoft.com/dotnet/sdk:8.0",
//#endif
"hostRequirements": {
"cpus": 4
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
echo A | xcopy .\bin\publish-x64 .\publish-result /s /e /h
echo A | xcopy .\bin\publish .\publish-result /s /e /h
dotnet tool restore
dotnet vpk pack -u Boilerplate.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e Boilerplate.Client.Windows-x86.exe -r win-x86 --framework net9.0.0-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle 'Boilerplate'
dotnet vpk pack -u Boilerplate.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e Boilerplate.Client.Windows-x86.exe -r win-x86 --framework net9.0-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle 'Boilerplate'
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
{
"id": "helpUrl"
},
{
"framework": "framework"
},
{
"id": "database"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@
"sourceName": "Boilerplate",
"preferNameDirectory": true,
"symbols": {
"framework": {
"type": "parameter",
"description": "The target framework for the project.",
"datatype": "choice",
"defaultValue": "net8.0",
"choices": [
{
"choice": "net8.0",
"description": "Target net8.0"
},
{
"choice": "net9.0",
"description": "Target net9.0"
}
],
"replaces": "net9.0"
},
"helpUrl": {
"displayName": "More info at",
"type": "parameter",
Expand Down Expand Up @@ -62,10 +79,6 @@
"choice": "Cosmos",
"description": "Azure Cosmos DB"
},
{
"choice": "MySql",
"description": "MySql - MariaDB"
},
{
"choice": "Other",
"description": "You can install and configure any database supported by ef core (https://learn.microsoft.com/en-us/ef/core/providers)"
Expand Down Expand Up @@ -298,7 +311,9 @@
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"args": {
"files": [ "Boilerplate.Web.slnf" ]
"files": [
"Boilerplate.Web.slnf"
]
},
"continueOnError": true
},
Expand Down Expand Up @@ -442,6 +457,24 @@
"exclude": [
"src/Server/Boilerplate.Server.Web/appsettings*.json"
]
},
{
"condition": "(framework == \"net8.0\")",
"exclude": [
"global.json",
"src/Directory.Packages.props"
],
"rename": {
"global8.json": "global.json",
"src/Directory.Packages8.props": "src/Directory.Packages.props"
}
},
{
"condition": "(framework == \"net9.0\")",
"exclude": [
"global8.json",
"src/Directory.Packages8.props"
]
}
]
}
Expand Down
6 changes: 6 additions & 0 deletions src/Templates/Boilerplate/Bit.Boilerplate/global8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.400",
"rollForward": "latestFeature"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
<!--/+:msbuild-conditional:noEmit -->
<WasmEnableSIMD Condition=" '$(framework)' == 'net8.0'">false</WasmEnableSIMD>
<WasmStripILAfterAOT Condition=" '$(offlineDb)' == 'false'">true</WasmStripILAfterAOT>
<WasmBuildNative Condition=" '$(offlineDb)' == 'true' OR '$(offlineDb)' == ''">true</WasmBuildNative>
<!--/-:msbuild-conditional:noEmit -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
<Environment Condition="'$(Environment)' == '' AND '$(Configuration)' == 'Debug'">Development</Environment>
<Environment Condition="'$(Environment)' == '' AND '$(Configuration)' == 'Release'">Production</Environment>

<!--#if (framework == net8.0) -->
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-ios'))">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-mac'))">14.0</SupportedOSPlatformVersion>
<!--#else -->
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-ios'))">16.4</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-mac'))">16.4</SupportedOSPlatformVersion>
<!--#endif -->
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-android'))">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows10'))">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows10'))">10.0.17763.0</TargetPlatformMinVersion>
Expand Down
Loading

0 comments on commit 450c422

Please sign in to comment.