-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCodeScan.csproj
More file actions
103 lines (90 loc) · 3.92 KB
/
CodeScan.csproj
File metadata and controls
103 lines (90 loc) · 3.92 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
93
94
95
96
97
98
99
100
101
102
103
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>CodeScan</RootNamespace>
<AssemblyName>codescan</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!-- AOT (use publish profiles for local deploy) -->
<PublishAot>true</PublishAot>
<InvariantGlobalization>false</InvariantGlobalization>
<TrimMode>link</TrimMode>
<IlcOptimizationPreference>Size</IlcOptimizationPreference>
<!-- Version: auto-bumped by BumpVersion target (do not set manually) -->
</PropertyGroup>
<ItemGroup>
<InternalsVisibleTo Include="CodeScan.Tests" />
</ItemGroup>
<ItemGroup>
<Folder Include="Prompt\TestFileDB\" />
<Compile Remove="Tests\**" />
<!-- TestSample/ holds multi-language e2e fixtures; never compile them into codescan itself. -->
<Compile Remove="TestSample\**" />
<Content Remove="TestSample\**" />
<None Remove="TestSample\**" />
<EmbeddedResource Remove="TestSample\**" />
<!-- docker/ holds container-side semantic analyzers (Phase 1+); they have
their own .csproj files and must not be compiled into codescan itself. -->
<Compile Remove="docker\**" />
<Content Remove="docker\**" />
<None Remove="docker\**" />
<EmbeddedResource Remove="docker\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.5" />
<PackageReference Include="Terminal.Gui" Version="2.0.0-beta.*" />
</ItemGroup>
<!-- ============================================================
Auto Version Bump: 빌드마다 마이너(끝자리) +1
마이너 >= 100 → 마이너 리셋, 중간 버전 +1
메이저는 수동만 (version.txt 직접 수정)
현재 버전은 version.txt 에서 관리
============================================================ -->
<UsingTask TaskName="BumpVersion"
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<VersionFilePath ParameterType="System.String" Required="true" />
<ResultVersion ParameterType="System.String" Output="true" />
</ParameterGroup>
<Task>
<Code Type="Fragment" Language="cs"><![CDATA[
int major = 0, middle = 0, minor = 0;
if (File.Exists(VersionFilePath))
{
var parts = File.ReadAllText(VersionFilePath).Trim().Split('.');
if (parts.Length == 3)
{
int.TryParse(parts[0], out major);
int.TryParse(parts[1], out middle);
int.TryParse(parts[2], out minor);
}
}
// Bump minor
minor++;
// Rollover: minor >= 100 → reset minor, bump middle
if (minor >= 100)
{
minor = 0;
middle++;
}
// Major는 자동 증가 없음 (version.txt 에서 수동 변경)
ResultVersion = $"{major}.{middle}.{minor}";
File.WriteAllText(VersionFilePath, ResultVersion);
]]>
</Code>
</Task>
</UsingTask>
<!-- CI sets SkipAutoBumpVersion=true and supplies -p:Version=x.y.z explicitly,
so release builds keep the tag's version instead of bumping it. -->
<Target Name="AutoBumpVersion" BeforeTargets="BeforeBuild" Condition="'$(SkipAutoBumpVersion)' != 'true'">
<BumpVersion VersionFilePath="$(MSBuildProjectDirectory)\version.txt">
<Output TaskParameter="ResultVersion" PropertyName="Version" />
</BumpVersion>
<Message Importance="high" Text="=== CodeScan Build Version: $(Version) ===" />
</Target>
<Target Name="LogPinnedVersion" BeforeTargets="BeforeBuild" Condition="'$(SkipAutoBumpVersion)' == 'true'">
<Message Importance="high" Text="=== CodeScan Pinned Build Version: $(Version) (auto-bump skipped) ===" />
</Target>
</Project>