Skip to content

Commit

Permalink
feat: update to 8.10.0-pre-05 #53 (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi authored Aug 6, 2024
1 parent 567b428 commit 6d60578
Show file tree
Hide file tree
Showing 320 changed files with 3,313 additions and 4,245 deletions.
28 changes: 13 additions & 15 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
{
"name": "Bit Templates Playground",
"name": "Bit.TemplatePlayground",
"hostRequirements": {
"cpus": 4
},
"onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/86497c4f-3dc8-4ee7-9f6a-9e0464059427/293d074c28bbfd9410f4db8e021fa290/dotnet-sdk-8.0.301-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && dotnet dev-certs https --trust && sudo dotnet workload install wasm-tools wasm-experimental && dotnet tool install --global dotnet-ef --version 8.0.6 && dotnet ef database update --project src/Bit.TemplatePlayground.Server/Bit.TemplatePlayground.Server.csproj && dotnet build src/Client/Bit.TemplatePlayground.Client.Core/Bit.TemplatePlayground.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks --no-restore",
"onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/60218cc4-13eb-41d5-aa0b-5fd5a3fb03b8/6c42bee7c3651b1317b709a27a741362/dotnet-sdk-8.0.303-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && dotnet dev-certs https --trust && sed -i 's/Microsoft.NET.Sdk.BlazorWebAssembly/Microsoft.NET.Sdk.Web/g' src/Client/Bit.TemplatePlayground.Client.Web/Bit.TemplatePlayground.Client.Web.csproj",
"waitFor": "onCreateCommand",
"customizations": {
"codespaces": {
"openFiles": [
"src/Client/Bit.TemplatePlayground.Client.Core/Components/Pages/HomePage.razor"
"README.md"
]
},
"vscode": {
"extensions": [
"ms-dotnettools.vscode-dotnet-runtime",
"glenn2223.live-sass",
"ms-dotnettools.blazorwasm-companion",
"kevin-chatham.aspnetcorerazor-html-css-class-completion",
"ms-dotnettools.csharp",
"yy0931.vscode-sqlite3-editor",
"glenn2223.live-sass"
"DominicVonk.vscode-resx-editor",
"ms-dotnetools.csharp",
"ms-dotnettools.vscode-dotnet-runtime",
"yy0931.vscode-sqlite3-editor"
]
}
},
"portsAttributes": {
"5030": {
"label": "Api",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [
5030
4225,
5000,
5242
],
"remoteEnv": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
60 changes: 30 additions & 30 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bit.TemplatePlayground CD
# https://bitplatform.dev/templates/dev-ops

env:
API_SERVER_ADDRESS: 'https://use-your-server-url-here.com/'
SERVER_ADDRESS: 'https://use-your-server-url-here.com/'
APP_SERVICE_NAME: 'app-service-bp-test'
IOS_CODE_SIGN_PROVISION: 'Bit.TemplatePlayground'

Expand Down Expand Up @@ -38,31 +38,31 @@ jobs:
# - name: Enable pre rendering
# run: sed -i 's/public static readonly bool PrerenderEnabled = false;/public static readonly bool PrerenderEnabled = true;/g' src/Client/Bit.TemplatePlayground.Client.Core/Services/AppRenderMode.cs

- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json'
files: 'src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json, src/Shared/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ServerAddress: ${{ env.SERVER_ADDRESS }}

- name: Install wasm
run: cd src && dotnet workload install wasm-tools wasm-experimental

- name: Generate CSS/JS files
run: dotnet build src/Client/Bit.TemplatePlayground.Client.Core/Bit.TemplatePlayground.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks --no-restore
run: dotnet build src/Client/Bit.TemplatePlayground.Client.Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore -c Release

- name: Publish
run: dotnet publish src/Bit.TemplatePlayground.Server/Bit.TemplatePlayground.Server.csproj -c Release --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/server
run: dotnet publish src/Server/Bit.TemplatePlayground.Server.Web/Bit.TemplatePlayground.Server.Web.csproj -c Release --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/server

- name: Build migrations bundle
run: |
cd src/Bit.TemplatePlayground.Server/ && dotnet tool restore && dotnet ef migrations bundle --self-contained -r linux-x64 --project Bit.TemplatePlayground.Server.csproj
cd src/Server/Bit.TemplatePlayground.Server.Api/ && dotnet tool restore && dotnet ef migrations bundle --self-contained -r linux-x64 --project Bit.TemplatePlayground.Server.Api.csproj
- name: Upload ef migrations bundle
uses: actions/upload-artifact@v4
with:
name: migrations-bundle
path: src/Bit.TemplatePlayground.Server/efbundle
path: src/Server/Bit.TemplatePlayground.Server.Api/efbundle

- name: Upload server artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -96,18 +96,18 @@ jobs:
files: 'appsettings.json'
env:
ConnectionStrings_SqlServerConnectionString: ${{ secrets.DB_CONNECTION_STRING }}
AppSettings_IdentitySettings_IdentityCertificatePassword: ${{ secrets.API_IDENTITY_CERTIFICATE_PASSWORD }}
DataProtectionCertificatePassword: ${{ secrets.API_DATA_PROTECTION_CERTIFICATE_PASSWORD }}

- name: Delete IdentityCertificate.pfx
- name: Delete DataProtectionCertificate.pfx
run: |
rm IdentityCertificate.pfx
rm DataProtectionCertificate.pfx
- name: Extract identity certificate from env
- name: Extract data protection certificate from env
uses: timheuer/[email protected]
with:
fileDir: './'
fileName: 'IdentityCertificate.pfx'
encodedString: ${{ secrets.API_IDENTITY_CERTIFICATE_FILE_BASE64 }}
fileName: 'DataProtectionCertificate.pfx'
encodedString: ${{ secrets.API_DATA_PROTECTION_CERTIFICATE_FILE_BASE64 }}

- name: Run migrations
run: |
Expand Down Expand Up @@ -142,16 +142,16 @@ jobs:
with:
node-version: 20

- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'src\Client\Bit.TemplatePlayground.Client.Core\appsettings.json'
files: 'src\Client\Bit.TemplatePlayground.Client.Core\appsettings.json, src\Shared\appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ServerAddress: ${{ env.SERVER_ADDRESS }}
WindowsUpdateSettings.FilesUrl: 'https://use-your-server-url-here.com/windows' # Deploy the published Windows application files to your desired hosting location and use the host url here.

- name: Generate CSS/JS files
run: dotnet build src\Client\Bit.TemplatePlayground.Client.Core\Bit.TemplatePlayground.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks --no-restore
run: dotnet build src\Client\Bit.TemplatePlayground.Client.Core\Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore -c Release

- name: Publish
run: |
Expand All @@ -169,7 +169,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 Bit.TemplatePlayground.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e Bit.TemplatePlayground.Client.Windows-x86.exe -r win-x86 --framework net8.0.6-x86-desktop,net8.0.6-x86-aspnetcore,webview2 --icon .\wwwroot\favicon.ico --packTitle 'Bit.TemplatePlayground'
dotnet vpk pack -u Bit.TemplatePlayground.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e Bit.TemplatePlayground.Client.Windows-x86.exe -r win-x86 --framework net8.0.7-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle 'Bit.TemplatePlayground'
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -202,12 +202,12 @@ jobs:
fileName: 'Bit.TemplatePlayground.keystore'
encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }}

- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json'
files: 'src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json, src/Shared/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ServerAddress: ${{ env.SERVER_ADDRESS }}

- name: Install maui
run: cd src && dotnet workload install maui-android
Expand All @@ -217,8 +217,8 @@ jobs:

- name: Generate CSS/JS files
run: |
dotnet build src/Client/Bit.TemplatePlayground.Client.Core/Bit.TemplatePlayground.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks --no-restore
dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -t:BeforeBuildTasks --no-restore
dotnet build src/Client/Bit.TemplatePlayground.Client.Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore -c Release
dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -t:BeforeBuildTasks --no-restore -c Release
- name: Build aab
run: dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -c Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="Bit.TemplatePlayground.keystore" -p:AndroidSigningKeyAlias=Bit.TemplatePlayground -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net8.0-android
Expand Down Expand Up @@ -248,18 +248,18 @@ jobs:

- uses: maxim-lobanov/[email protected]
with:
xcode-version: '15.3'
xcode-version: '15.4'

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/[email protected]
with:
files: 'src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json'
files: 'src/Client/Bit.TemplatePlayground.Client.Core/appsettings.json, src/Shared/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ServerAddress: ${{ env.SERVER_ADDRESS }}

- name: Install maui
run: cd src && dotnet workload install maui
Expand All @@ -280,8 +280,8 @@ jobs:

- name: Generate CSS/JS files
run: |
dotnet build src/Client/Bit.TemplatePlayground.Client.Core/Bit.TemplatePlayground.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks --no-restore
dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -t:BeforeBuildTasks --no-restore
dotnet build src/Client/Bit.TemplatePlayground.Client.Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore -c Release
dotnet build src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -t:BeforeBuildTasks --no-restore -c Release
- name: Build ipa
run: dotnet publish src/Client/Bit.TemplatePlayground.Client.Maui/Bit.TemplatePlayground.Client.Maui.csproj -p:RuntimeIdentifier=ios-arm64 -c Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="${{ env.IOS_CODE_SIGN_PROVISION }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-ios
Expand Down
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,6 @@ GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# VS Code
.vscode

# .NET Meteor
.meteor

Expand All @@ -227,9 +224,8 @@ profile.arm.json
/**/*.css
custom.aprof

/src/Bit.TemplatePlayground.Server/Attachments/**/*.*
/src/**/App_Data/*

/src/Client/Bit.TemplatePlayground.Client.Core/wwwroot/scripts/app*.js

/src/Bit.TemplatePlayground.Server/*.db*
.env
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "C#: Bit.TemplatePlayground.Server.Web Debug",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/src/Server/Bit.TemplatePlayground.Server.Web/Bit.TemplatePlayground.Server.Web.csproj"
},
{
"name": "C#: Bit.TemplatePlayground.Server.Api Debug",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/src/Server/Bit.TemplatePlayground.Server.Api/Bit.TemplatePlayground.Server.Api.csproj"
}
]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"liveSassCompile.settings.watchOnLaunch": true,
"dotnet.defaultSolution": "Bit.TemplatePlayground.Web.slnf"
}
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "dotnet build",
"type": "shell",
"command": "dotnet build src/Client/Bit.TemplatePlayground.Client.Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks",
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
5 changes: 3 additions & 2 deletions Bit.TemplatePlayground.Web.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"solution": {
"path": "Bit.TemplatePlayground.sln",
"projects": [
"src\\Bit.TemplatePlayground.Server\\Bit.TemplatePlayground.Server.csproj",
"src\\Bit.TemplatePlayground.Shared\\Bit.TemplatePlayground.Shared.csproj",
"src\\Server\\Bit.TemplatePlayground.Server.Web\\Bit.TemplatePlayground.Server.Web.csproj",
"src\\Server\\Bit.TemplatePlayground.Server.Api\\Bit.TemplatePlayground.Server.Api.csproj",
"src\\Shared\\Bit.TemplatePlayground.Shared.csproj",
"src\\Client\\Bit.TemplatePlayground.Client.Core\\Bit.TemplatePlayground.Client.Core.csproj",
"src\\Client\\Bit.TemplatePlayground.Client.Web\\Bit.TemplatePlayground.Client.Web.csproj"
]
Expand Down
Loading

0 comments on commit 6d60578

Please sign in to comment.