-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
92 lines (80 loc) · 4.71 KB
/
Copy pathDirectory.Build.props
File metadata and controls
92 lines (80 loc) · 4.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<Project>
<PropertyGroup>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>
<!-- 定义 Linux -->
<PropertyGroup>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)' == 'true'">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<!--
本仓库产出两个包,共用这个版本号:
VelaShell.Plugin.Cli dotnet tool `vela-plugin`
VelaShell.PluginSdk.Build 插件工程引用的那一个包(targets + 打包器 + 依赖锁)
这两个**必须同版本发**:.Build 把 vela-plugin 的构建产物收进包的 tools/,
它的 targets 直接调那个打包器的命令面(`validate` / `pack`)。命令行参数改了而
targets 没跟上,现象是插件作者构建到一半 Exec 失败 —— 所以它俩是一个发布单元。
**与契约 SDK 解耦**(2026-08-27 拆库起):VelaShell.PluginSdk 在
VelaShellLabs/velashell-plugin-sdk,有自己的版本号。SDK 发 1.6.0 不要求本仓库跟着发;
本仓库发 1.5.3 也不代表契约动了。想吃到新契约时,直接把两个 csproj 里
VelaShell.PluginSdk 的 PackageReference 版本抬上来再发一版即可 —— 走 NuGet
(或合掉 Dependabot 的 PR)更新,**不要**抽成 MSBuild 属性:Version="$(...)"
会让 Dependabot 与 `dotnet add package` 认不出这条依赖。
CI 发包时用 -p:VelaToolsVersion= 覆盖(取自 Release 标签)。
-->
<VelaToolsVersion Condition="'$(VelaToolsVersion)' == ''">2.0.2</VelaToolsVersion>
<!-- 去掉预发布后缀的数字版(AssemblyVersion/FileVersion 不接受后缀)与主版本号。 -->
<VelaToolsVersionCore>$([System.Text.RegularExpressions.Regex]::Replace($(VelaToolsVersion), '-.*$', ''))</VelaToolsVersionCore>
<VelaToolsMajor>$([System.Text.RegularExpressions.Regex]::Replace($(VelaToolsVersionCore), '\..*$', ''))</VelaToolsMajor>
<Version>$(VelaToolsVersion)</Version>
<AssemblyVersion>$(VelaToolsMajor).0.0.0</AssemblyVersion>
<FileVersion>$(VelaToolsVersionCore)</FileVersion>
<!-- 不把 git 提交哈希拼进 InformationalVersion(默认会加 +sha 后缀)。
`vela-plugin -v` 打的就是 InformationalVersion,带上 +sha 会很难看。 -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>
<!--
⚠️ 插件生态的 Avalonia 版本**不在这里定义**。它是一条普通的 NuGet 依赖,版本写在
src/VelaShell.PluginSdk.Build/VelaShell.PluginSdk.Build.csproj 那条 PackageReference
的精确区间 [x.y.z] 上(以及包里发给插件工程的 build/VelaShell.PluginSdk.Build.props),
用 VS 的 NuGet 包管理器直接升即可。权威值在 velashell-plugin-sdk,由该包导出的
$(VelaSdkPinnedAvaloniaVersion) 在构建期核对(VELA1000 / VELA1006)。
-->
<PropertyGroup>
<Authors>joesdu</Authors>
<PackagePrefix>VelaShell</PackagePrefix>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/VelaShellLabs/velashell-plugin-cli</RepositoryUrl>
<PackageLicenseExpression>AGPL-3.0-only</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/VelaShellLabs/velashell-plugin-cli</PackageProjectUrl>
<GenerateAssemblyConfigurationAttribute>True</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>True</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>True</GenerateAssemblyProductAttribute>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net11.0'">
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<Features>$(Features);runtime-async=on</Features>
<NoWarn>$(NoWarn);CA2252;SYSLIB5007;</NoWarn>
</PropertyGroup>
<ItemGroup>
<None Include=".\README.md" Pack="true" PackagePath="" />
</ItemGroup>
<PropertyGroup>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);IDE0047;</NoWarn>
</PropertyGroup>
<!--
⚠️ 本仓库的程序集**不做强名称签名**,因此不需要 STRONG_NAME_KEY 机密。
方向是对的:未签名程序集可以引用已签名的(vela-plugin → VelaShell.PluginSdk),
反过来才不行。契约 SDK 之所以必须签,是因为**宿主**(已签名)要引用它。
-->
</Project>