-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
45 lines (40 loc) · 2.02 KB
/
Copy pathDirectory.Build.props
File metadata and controls
45 lines (40 loc) · 2.02 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
<Project>
<!-- Shared identity / versioning for every managed project in the repo.
This is the repo's own version, which is the cross-platform Avalonia
app's: 2.0.0 marks it becoming the app MeshRF ships.
scripts/build-release.ps1 reads VersionPrefix from the app project being
packaged, falling back to this file. -->
<PropertyGroup>
<Product>MeshRF</Product>
<Company>MeshRF</Company>
<Authors>Ixitxachitl</Authors>
<Copyright>Copyright © Ixitxachitl</Copyright>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<RepositoryUrl>https://github.com/Ixitxachitl/MeshRF</RepositoryUrl>
<VersionPrefix>2.6.6</VersionPrefix>
<!-- AssemblyVersion is kept at major.minor.0.0 for binding stability;
FileVersion and InformationalVersion carry the full build identity. -->
<AssemblyVersion>2.6.0.0</AssemblyVersion>
<FileVersion>2.6.6.0</FileVersion>
</PropertyGroup>
<!-- Append the short git commit hash to the informational version so the
About box can show exactly which build is running (e.g. "0.1.0+dfc2918").
Best-effort: if git is unavailable the build still succeeds with the
bare version. Setting SourceRevisionId lets the .NET SDK append it. -->
<Target Name="SetGitCommitHash"
BeforeTargets="AddSourceRevisionToInformationalVersion"
Condition="'$(GitCommitHashResolved)' != 'true'">
<Exec Command="git rev-parse --short HEAD"
ConsoleToMSBuild="true"
StandardOutputImportance="low"
ContinueOnError="true"
WorkingDirectory="$(MSBuildThisFileDirectory)">
<Output TaskParameter="ConsoleOutput" PropertyName="_GitCommitHash" />
<Output TaskParameter="ExitCode" PropertyName="_GitExitCode" />
</Exec>
<PropertyGroup>
<GitCommitHashResolved>true</GitCommitHashResolved>
<SourceRevisionId Condition="'$(_GitExitCode)' == '0' and '$(_GitCommitHash)' != ''">$(_GitCommitHash)</SourceRevisionId>
</PropertyGroup>
</Target>
</Project>