Refactor Generator config

This commit is contained in:
CHINBOY
2025-03-11 19:01:43 +08:00
parent bfb14bc9af
commit d9df185626
8 changed files with 28 additions and 8 deletions
+6 -1
View File
@@ -4,6 +4,7 @@
<AvaloniaVersion>11.2.5</AvaloniaVersion>
<AtomUIVersion>0.0.2</AtomUIVersion>
<IsNightlyBuild Condition="'$(IsNightlyBuild)' == ''">false</IsNightlyBuild>
<BuildTimestamp Condition="'$(BuildTimestamp)' == ''">$([System.DateTime]::Now.ToString("yyyyMMddHHmm"))</BuildTimestamp>
<CanAppendBuildInfo>false</CanAppendBuildInfo>
</PropertyGroup>
@@ -13,7 +14,11 @@
<PropertyGroup Condition="'$(IsNightlyBuild)' == 'true'">
<OriginVersion>$(AtomUIVersion)</OriginVersion>
<AtomUIVersion>$(AtomUIVersion)-build.$([System.DateTime]::Now.ToString("yyyyMMddHHmmss"))</AtomUIVersion>
<AtomUIVersion>$(AtomUIVersion)-build.$(BuildTimestamp)</AtomUIVersion>
</PropertyGroup>
<PropertyGroup>
<Version>$(AtomUIVersion)</Version>
</PropertyGroup>
<Target Name="CheckNightlyVersion" BeforeTargets="Build">
+2 -2
View File
@@ -29,8 +29,8 @@ try {
return
}
} catch [System.IO.IOException] {
if (Test-Path $path) {
Write-Host "目录已被其他进程创建: $path"
if (Test-Path $buildMarker) {
Write-Host "目录已被其他进程创建: $buildMarker"
} else {
Write-Host "创建失败: $_,跳过编译"
}
+6 -2
View File
@@ -3,8 +3,12 @@ param (
[string]$buildType = "Release"
)
dotnet build -v diag --configuration $buildType ../AtomUI.sln
dotnet pack --no-build --configuration $buildType /p:IsNightlyBuild=true ../packages/AtomUI/AtomUI.csproj
$buildTimestamp = Get-Date -Format 'yyyyMMddHHmm'
dotnet build -v diag --configuration $buildType ../packages/AtomUI/AtomUI.csproj
dotnet pack --no-build --configuration $buildType /p:IsNightlyBuild=true /p:BuildTimestamp=$buildTimestamp ../packages/AtomUI/AtomUI.csproj
dotnet pack --no-build --configuration $buildType /p:IsNightlyBuild=true /p:BuildTimestamp=$buildTimestamp ../src/AtomUI.IconPkg.Generator/AtomUI.IconPkg.Generator.csproj
dotnet pack --no-build --configuration $buildType /p:IsNightlyBuild=true /p:BuildTimestamp=$buildTimestamp ../src/AtomUI.Generator/AtomUI.Generator.csproj
# 探测包
$packages = Get-ChildItem -Path ../output/Nuget -Filter *.nupkg -Recurse -File
+4 -1
View File
@@ -22,7 +22,10 @@
<ItemGroup>
<ProjectReference Include="../AtomUI.IconPkg.AntDesign/AtomUI.IconPkg.AntDesign.csproj" />
<ProjectReference Include="../AtomUI.Theme/AtomUI.Theme.csproj"/>
<ProjectReference Include="../AtomUI.Generator/AtomUI.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="../AtomUI.Generator/AtomUI.Generator.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all"/>
</ItemGroup>
</Project>
@@ -4,6 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<IsRoslynComponent>true</IsRoslynComponent>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>
@@ -15,7 +15,10 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../AtomUI.IconPkg.Generator/AtomUI.IconPkg.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="../AtomUI.IconPkg.Generator/AtomUI.IconPkg.Generator.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all"/>
<ProjectReference Include="../AtomUI.IconPkg/AtomUI.IconPkg.csproj" />
</ItemGroup>
@@ -4,6 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<IsRoslynComponent>true</IsRoslynComponent>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>
+4 -1
View File
@@ -14,7 +14,10 @@
<ItemGroup>
<ProjectReference Include="../AtomUI.Base/AtomUI.Base.csproj"/>
<ProjectReference Include="../AtomUI.Generator/AtomUI.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="../AtomUI.Generator/AtomUI.Generator.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false"
PrivateAssets="all"/>
</ItemGroup>
<ItemGroup>