Skip to content

Commit

Permalink
Set up packaging and versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongin committed Nov 15, 2022
1 parent c0a6299 commit dec9f88
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
Expand All @@ -12,9 +11,14 @@
<BaseIntermediateOutputPath>$(BaseOutputPath)obj/$(Configuration)/$(MSBuildProjectName)/</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<CompilerVisibleProperty Include="BaseIntermediateOutputPath" /><!-- Used by NodeApi source generator. -->
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="All" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.5.119" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion NodeApi/NodeApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<PropertyGroup>
<RootNamespace>NodeApi</RootNamespace>
<AssemblyName>NodeApi</AssemblyName>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
21 changes: 21 additions & 0 deletions version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",

"version": "0.1",

"publicReleaseRefSpec": [
"^refs/heads/main$",
"^refs/heads/v\\d+(?:.\\d+)?$",
"^refs/heads/releases/.+$"
],
"cloudBuild": {
"setVersionVariables": true,
"buildNumber": {
"enabled": true,
"includeCommitId": {
"when": "nonPublicReleaseOnly",
"where": "fourthVersionComponent"
}
}
}
}

0 comments on commit dec9f88

Please sign in to comment.