Skip to content

Commit

Permalink
Merge pull request #8274 from bitfoundation/develop
Browse files Browse the repository at this point in the history
Version 8.10.0 (#8256)
  • Loading branch information
msynk authored Aug 8, 2024
2 parents 4e13d1f + ba38d89 commit 11e752d
Show file tree
Hide file tree
Showing 1,414 changed files with 42,723 additions and 39,609 deletions.
5 changes: 1 addition & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"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 && sudo dotnet workload install wasm-tools wasm-experimental && dotnet dev-certs https --trust && dotnet build src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Bit.BlazorUI.Demo.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks --no-restore && dotnet build src/Websites/Platform/src/Bit.Websites.Platform.Client/Bit.Websites.Platform.Client.csproj -t:InstallNodejsDependencies,BeforeBuildTasks --no-restore && dotnet build src/Websites/Sales/src/Bit.Websites.Sales.Client/Bit.Websites.Sales.Client.csproj -t:InstallNodejsDependencies,BeforeBuildTasks --no-restore && dotnet build src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.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 && find . -type f -name '*.csproj' -exec sed -i 's/Microsoft.NET.Sdk.BlazorWebAssembly/Microsoft.NET.Sdk.Web/g' {} \\;",
"waitFor": "onCreateCommand",
"customizations": {
"codespaces": {
Expand All @@ -13,9 +13,6 @@
},
"vscode": {
"extensions": [
"ms-dotnettools.vscode-dotnet-runtime",
"kevin-chatham.aspnetcorerazor-html-css-class-completion",
"ms-dotnettools.csharp",
"glenn2223.live-sass"
]
}
Expand Down
81 changes: 44 additions & 37 deletions .github/workflows/admin-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Admin Sample CD
# Project templates come equipped with CI/CD for both Azure DevOps and GitHub, providing you with a hassle-free way to get started with your new project. It is important to note that you should not depend on the contents of this file. More info at https://bitplatform.dev/templates/dev-ops

env:
API_SERVER_ADDRESS: 'https://adminpanel.bitplatform.dev/'
API_SERVER_ADDRESS: 'https://adminpanel-api.bitplatform.dev'
WEB_SERVER_ADDRESS: 'https://adminpanel.bitplatform.dev'
APP_SERVICE_NAME: 'bit-adminpanel'

on:
Expand Down Expand Up @@ -35,14 +36,14 @@ 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 SqlServer --sample Admin --appInsights --serverUrl adminpanel.bitplatform.dev
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage --api Standalone
- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json, AdminPanel/src/Shared/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ServerAddress: ${{ env.API_SERVER_ADDRESS }}
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}

- uses: actions/setup-node@v4
Expand All @@ -55,24 +56,30 @@ jobs:
- name: Configure app render mode
run: |
sed -i 's/Auto;/BlazorWebAssembly;/g' AdminPanel/src/Client/AdminPanel.Client.Core/Services/AppRenderMode.cs
- name: Configure bswup
run: |
sed -i 's/self.noPrerenderQuery/\/\/ self.noPrerenderQuery/g' AdminPanel/src/Client/AdminPanel.Client.Web/wwwroot/service-worker.js
sed -i 's/self.isPassive = self.disablePassiveFirstBoot = true;/self.isPassive = self.disablePassiveFirstBoot = false;/g' AdminPanel/src/Client/AdminPanel.Client.Web/wwwroot/service-worker.js
- name: Generate CSS/JS files
run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore

run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release
- name: Publish
run: dotnet publish AdminPanel/src/AdminPanel.Server/AdminPanel.Server.csproj -c Release -p:PwaEnabled=true --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/server -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}"
run: dotnet publish AdminPanel/src/Server/AdminPanel.Server.Api/AdminPanel.Server.Api.csproj -c Release -p:PwaEnabled=true -p:PublishTrimmed=true -p:TrimMode=partial -p:JsonSerializerIsReflectionEnabledByDefault=true --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/server -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}"

- name: Upload server artifact
uses: actions/upload-artifact@v4
with:
name: server-bundle
path: ${{env.DOTNET_ROOT}}/server

- name: Publish adminpanel blazor wasm standalone
run: |
sed -i 's/adminpanel.bitplatform.dev/adminpanel-api.bitplatform.dev/g' AdminPanel/src/Client/AdminPanel.Client.Web/wwwroot/index.html
dotnet publish AdminPanel/src/Client/AdminPanel.Client.Web/AdminPanel.Client.Web.csproj -c Release -p:BlazorWebAssemblyStandalone=true -o ${{env.DOTNET_ROOT}}/static
- name: Upload static artifact
uses: actions/upload-artifact@v4
with:
name: static-bundle
path: ${{env.DOTNET_ROOT}}/static

deploy_api_blazor:
name: deploy api + blazor
needs: build_api_blazor
Expand All @@ -88,16 +95,16 @@ jobs:
with:
name: server-bundle

- name: Delete IdentityCertificate.pfx
- name: Delete DataProtectionCertificate.pfx
run: |
rm IdentityCertificate.pfx
rm DataProtectionCertificate.pfx
- name: Extract identity certificate from env
uses: timheuer/base64-to-file@v1.2
with:
fileDir: './'
fileName: 'IdentityCertificate.pfx'
encodedString: ${{ secrets.API_IDENTITY_CERTIFICATE_FILE_BASE64 }}
fileName: 'DataProtectionCertificate.pfx'
encodedString: ${{ secrets.API_DATA_PROTECTION_CERTIFICATE_FILE_BASE64 }}

- name: Deploy to Azure Web App
id: deploy-to-webapp
Expand All @@ -109,7 +116,7 @@ jobs:
package: .

- name: Purge cache
uses: jakejarvis/cloudflare-purge-action@master
uses: jakejarvis/cloudflare-purge-action@v0.3.0
env:
CLOUDFLARE_ZONE: ${{ secrets.BITPLATFORM_DEV_CLOUDFLARE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
Expand Down Expand Up @@ -137,19 +144,19 @@ 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 SqlServer --sample Admin --windows --appInsights --appCenter --serverUrl adminpanel.bitplatform.dev
cd ..\..\..\ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --windows --appInsights --appCenter --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage
- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'AdminPanel\src\Client\AdminPanel.Client.Core\appsettings.json'
files: 'AdminPanel\src\Client\AdminPanel.Client.Core\appsettings.json, AdminPanel\src\Shared\appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ServerAddress: ${{ env.API_SERVER_ADDRESS }}
WindowsUpdateSettings.FilesUrl: https://windows-adminpanel.bitplatform.dev
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}

- name: Generate CSS/JS files
run: dotnet build AdminPanel\src\Client\AdminPanel.Client.Core\AdminPanel.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore
run: dotnet build AdminPanel\src\Client\AdminPanel.Client.Core\AdminPanel.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release

- name: Set app center secret
run: (Get-Content AdminPanel\src\Client\AdminPanel.Client.Windows\Program.cs) -Replace 'appCenterSecret = null;', 'appCenterSecret = "a9ed2257-fb82-496a-ba10-78c2d9ef33a6";' | Out-File -Encoding utf8 AdminPanel\src\Client\AdminPanel.Client.Windows\Program.cs
Expand All @@ -171,7 +178,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 AdminPanel.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e AdminPanel.Client.Windows-x86.exe -r win-x86 --framework net8.0.6-x86-desktop,net8.0.6-x86-aspnetcore,webview2 --icon .\wwwroot\favicon.ico --packTitle 'AdminPanel'
dotnet vpk pack -u AdminPanel.Client.Windows -v "${{ vars.APPLICATION_DISPLAY_VERSION }}" -p .\publish-result -e AdminPanel.Client.Windows-x86.exe -r win-x86 --framework net8.0.7-x86-desktop,webview2 --icon .\wwwroot\favicon.ico --packTitle 'AdminPanel'
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand All @@ -198,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 SqlServer --sample Admin --appInsights --appCenter --serverUrl adminpanel.bitplatform.dev
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage
- uses: actions/setup-node@v4
with:
Expand All @@ -211,12 +218,12 @@ jobs:
fileName: 'AdminPanel.keystore'
encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }}

- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json, AdminPanel/src/Shared/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ServerAddress: ${{ env.API_SERVER_ADDRESS }}
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}

- name: Set app center secret
Expand All @@ -231,8 +238,8 @@ jobs:

- name: Generate CSS/JS files
run: |
dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore
dotnet build AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore
dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release
dotnet build AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release
- name: Build aab
run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -c Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="AdminPanel.keystore" -p:AndroidSigningKeyAlias=bitplatform -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-android
Expand All @@ -259,7 +266,7 @@ jobs:

- uses: maxim-lobanov/setup-xcode@v1.6.0
with:
xcode-version: '15.3'
xcode-version: '15.4'

- uses: actions/setup-node@v4
with:
Expand All @@ -270,14 +277,14 @@ 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 SqlServer --sample Admin --appInsights --appCenter --serverUrl adminpanel.bitplatform.dev
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl ${{ env.WEB_SERVER_ADDRESS }} --filesStorage AzureBlobStorage
- name: Update appsettings.json api server address
- name: Update core appsettings.json
uses: devops-actions/variable-substitution@v1.2
with:
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json'
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json, AdminPanel/src/Shared/appsettings.json'
env:
ApiServerAddress: ${{ env.API_SERVER_ADDRESS }}
ServerAddress: ${{ env.API_SERVER_ADDRESS }}
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}

- name: Set app center secret
Expand All @@ -303,8 +310,8 @@ jobs:

- name: Generate CSS/JS files
run: |
dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:InstallNodejsDependencies,BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore
dotnet build AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore
dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release
dotnet build AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release
- name: Build ipa
run: dotnet publish AdminPanel/src/Client/AdminPanel.Client.Maui/AdminPanel.Client.Maui.csproj -p:RuntimeIdentifier=ios-arm64 -c Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="AdminPanel" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-ios
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/bit.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
- name: Install wasm and maui
run: cd src && dotnet workload install maui-android wasm-tools wasm-experimental

- name: Install Nodejs dependencies
continue-on-error: true # Error MSB4057, not all csproj files have InstallNodejsDependencies target.
run: dotnet build src/Bit-CI-release.sln -t:InstallNodejsDependencies -m:1
- name: Run BeforeBuildTasks
continue-on-error: true # Error MSB4057, not all csproj files have BeforeBuildTasks target.
run: dotnet build src/Bit-CI-release.sln -t:BeforeBuildTasks -m:1

- name: MSBuild prerelease
run: dotnet build src/Bit-CI-release.sln
Expand Down Expand Up @@ -62,9 +62,9 @@ jobs:
- name: Install Android Sdk platform tools
run: ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools"

- name: Install Nodejs dependencies
continue-on-error: true # Error MSB4057, not all csproj files have InstallNodejsDependencies target.
run: dotnet build src/Bit-CI.sln -t:InstallNodejsDependencies -m:1
- name: Run BeforeBuildTasks
continue-on-error: true # Error MSB4057, not all csproj files have BeforeBuildTasks target.
run: dotnet build src/Bit-CI.sln -t:BeforeBuildTasks -m:1

- name: Build
run: dotnet build src/Bit-CI.sln -p:WarningLevel=0 -p:RunCodeAnalysis=false
Expand Down
Loading

0 comments on commit 11e752d

Please sign in to comment.