forked from TrakHound/MTConnect.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
66 lines (60 loc) · 3.23 KB
/
Copy pathDirectory.Build.props
File metadata and controls
66 lines (60 loc) · 3.23 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
<Project>
<PropertyGroup>
<VersionPrefix>6.9.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Copyright>Copyright (c) 2025 TrakHound Inc., All Rights Reserved.</Copyright>
<Company>TrakHound Inc.</Company>
<PackageTags>mtconnect;iiot;iot;cnc;</PackageTags>
<RepositoryUrl>https://github.com/TrakHound/MTConnect.NET</RepositoryUrl>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<!--
Solution-wide warning-as-error gate. Every campaign warning
cleanup commit lands underneath this — a regression that
reintroduces a warning fails the build. CI exercises the same
shape (it builds the same Directory.Build.props), so a future
PR that adds a warning is caught at compile time rather than
at code review.
Pair with the worktree-only SourceLink gate below: SourceLink
emits an un-coded warning ("Source control information is not
available - the generated source link is empty.") when the
build sees a git worktree (the `.git` file points up at a
parent gitdir, which the SourceLink.GitHub task does not
recognise) or a non-github.com remote alias. CI checks out
with a plain clone from github.com and never trips it, so
the gate stays sharp there.
-->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!--
Disable SourceLink locally when the build sees a git worktree
(`.git` is a file, not a directory) and the GitHub Actions env
var is unset. CI keeps SourceLink on so the produced symbols
link back to github.com; local worktree builds skip it to
avoid the un-coded warning that TreatWarningsAsErrors would
otherwise escalate.
The CI-side condition: GitHub-hosted runners set
GITHUB_ACTIONS=true on every step. When the build runs under
CI we want SourceLink active — even on a worktree-style
checkout, though `actions/checkout` produces a plain clone, so
the condition is double-belted.
-->
<EnableSourceLink Condition="'$(GITHUB_ACTIONS)' != 'true' AND Exists('$(MSBuildThisFileDirectory).git') AND !Exists('$(MSBuildThisFileDirectory).git/HEAD')">false</EnableSourceLink>
</PropertyGroup>
<!--
Suppress SourceLink git-repository discovery when the build/sysml-model
submodule has not been initialized. Microsoft.Build.Tasks.Git walks the
gitmodules list from the repo root and emits a "could not find .git"
warning for every project when build/sysml-model/.git is absent (the
gitdir pointer is written by "git submodule update"). This happens in
docker bind-mount builds, fresh clones without recurse-submodules, and
contributor worktrees that have not yet initialized the submodule.
Setting EnableSourceControlManagerQueries=false tells SourceLink to skip
the git-repository walk entirely; no PDB source-link data is embedded, but
the build is otherwise unaffected. The flag is only forced off when the
submodule gitdir pointer is absent; Package-configuration CI builds and
initialized developer checkouts are unaffected.
-->
<PropertyGroup Condition="!Exists('$(MSBuildThisFileDirectory)build/sysml-model/.git')">
<EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
<EnableSourceLink>false</EnableSourceLink>
</PropertyGroup>
</Project>