|
1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 |
|
| 3 | + <PropertyGroup> |
| 4 | + <TargetFramework>net8.0</TargetFramework> |
| 5 | + <ImplicitUsings>enable</ImplicitUsings> |
| 6 | + <Nullable>enable</Nullable> |
| 7 | + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
| 8 | + <Version>0.1.0</Version> |
| 9 | + <Description>SDK for programmatic control of GitHub Copilot CLI</Description> |
| 10 | + <Authors>GitHub</Authors> |
| 11 | + <Company>GitHub</Company> |
| 12 | + <Copyright>Copyright (c) Microsoft Corporation. All rights reserved.</Copyright> |
| 13 | + <PackageLicenseExpression>MIT</PackageLicenseExpression> |
| 14 | + <PackageReadmeFile>README.md</PackageReadmeFile> |
| 15 | + <RepositoryUrl>https://github.com/github/copilot-sdk</RepositoryUrl> |
| 16 | + <PackageTags>github;copilot;sdk;jsonrpc;agent</PackageTags> |
| 17 | + <IsAotCompatible>true</IsAotCompatible> |
| 18 | + </PropertyGroup> |
| 19 | + |
| 20 | + <ItemGroup> |
| 21 | + <None Include="../README.md" Pack="true" PackagePath="/" /> |
| 22 | + </ItemGroup> |
| 23 | + |
| 24 | + <ItemGroup> |
| 25 | + <PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="10.2.0" /> |
| 26 | + <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.2" /> |
| 27 | + <PackageReference Include="StreamJsonRpc" Version="2.24.84" PrivateAssets="compile" /> |
| 28 | + <PackageReference Include="System.Text.Json" Version="10.0.2" /> |
| 29 | + </ItemGroup> |
| 30 | + |
| 31 | + <!-- Generate version props file at build time (gitignored) --> |
| 32 | + <Target Name="_GenerateVersionProps" BeforeTargets="BeforeBuild;Pack"> |
| 33 | + <Exec Command="node -e "console.log(require('./nodejs/package-lock.json').packages['node_modules/@github/copilot'].version)"" WorkingDirectory="$(MSBuildThisFileDirectory)../.." ConsoleToMSBuild="true" StandardOutputImportance="low"> |
| 34 | + <Output TaskParameter="ConsoleOutput" PropertyName="CopilotCliVersion" /> |
| 35 | + </Exec> |
| 36 | + <Error Condition="'$(CopilotCliVersion)' == ''" Text="CopilotCliVersion could not be read from nodejs/package-lock.json" /> |
| 37 | + <PropertyGroup> |
| 38 | + <_VersionPropsContent> |
| 39 | + <![CDATA[<Project> |
3 | 40 | <PropertyGroup> |
4 | | - <TargetFramework>net8.0</TargetFramework> |
5 | | - <ImplicitUsings>enable</ImplicitUsings> |
6 | | - <Nullable>enable</Nullable> |
7 | | - <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
8 | | - <Version>0.1.0</Version> |
9 | | - <Description>SDK for programmatic control of GitHub Copilot CLI</Description> |
10 | | - <Authors>GitHub</Authors> |
11 | | - <Company>GitHub</Company> |
12 | | - <Copyright>Copyright (c) Microsoft Corporation. All rights reserved.</Copyright> |
13 | | - <PackageLicenseExpression>MIT</PackageLicenseExpression> |
14 | | - <PackageReadmeFile>README.md</PackageReadmeFile> |
15 | | - <RepositoryUrl>https://github.com/github/copilot-sdk</RepositoryUrl> |
16 | | - <PackageTags>github;copilot;sdk;jsonrpc;agent</PackageTags> |
17 | | - <IsAotCompatible>true</IsAotCompatible> |
| 41 | + <CopilotCliVersion>$(CopilotCliVersion)</CopilotCliVersion> |
18 | 42 | </PropertyGroup> |
| 43 | +</Project>]]> |
| 44 | + </_VersionPropsContent> |
| 45 | + </PropertyGroup> |
| 46 | + <WriteLinesToFile File="$(MSBuildThisFileDirectory)build\GitHub.Copilot.SDK.props" Lines="$(_VersionPropsContent)" Overwrite="true" WriteOnlyWhenDifferent="true" /> |
| 47 | + <!-- Explicitly add props file to package content after generation --> |
| 48 | + <ItemGroup> |
| 49 | + <None Include="build\GitHub.Copilot.SDK.props" Pack="true" PackagePath="build\" /> |
| 50 | + </ItemGroup> |
| 51 | + </Target> |
19 | 52 |
|
20 | | - <ItemGroup> |
21 | | - <None Include="../README.md" Pack="true" PackagePath="/" /> |
22 | | - </ItemGroup> |
23 | | - |
24 | | - <ItemGroup> |
25 | | - <PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="10.2.0" /> |
26 | | - <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.2" /> |
27 | | - <PackageReference Include="StreamJsonRpc" Version="2.24.84" PrivateAssets="compile" /> |
28 | | - <PackageReference Include="System.Text.Json" Version="10.0.2" /> |
29 | | - </ItemGroup> |
| 53 | + <!-- Include .targets file in package (props is added dynamically by _GenerateVersionProps) --> |
| 54 | + <!-- Also import the .targets for local dev (same logic consumers get) --> |
| 55 | + <ItemGroup> |
| 56 | + <None Include="build\GitHub.Copilot.SDK.targets" Pack="true" PackagePath="build\" CopyToOutputDirectory="Never" /> |
| 57 | + </ItemGroup> |
| 58 | + <Import Project="build\GitHub.Copilot.SDK.targets" /> |
30 | 59 |
|
31 | 60 | </Project> |
0 commit comments