Browse Source

setting up versioning

Tigger Kindel 2 years ago
parent
commit
738a5ec539
4 changed files with 94 additions and 37 deletions
  1. 37 0
      GitVersion.yml
  2. 53 35
      Terminal.Gui/Terminal.Gui.csproj
  3. 2 0
      Terminal.sln
  4. 2 2
      global.json

+ 37 - 0
GitVersion.yml

@@ -0,0 +1,37 @@
+mode: ContinuousDeployment
+tag-prefix: '[vV]'
+continuous-delivery-fallback-tag: 'pre'
+branches:
+  v1_develop:
+    mode: ContinuousDeployment
+    tag: pre
+  v1:
+    tag: rc
+    increment: Patch
+    source-branches:
+    - v1_develop
+
+  v2_develop:
+    mode: ContinuousDeployment
+    tag: pre
+  v2:
+    tag: alpha
+    increment: Patch
+    source-branches:
+    - v2_develop
+- 
+  # feature:
+  #   tag: useBranchName
+  #   regex: ^features?[/-]
+  #   source-branches:
+  #   - v1
+  #   - v1_develop
+  #   - v2
+  #   - v2_develop
+ 
+  pull-request:
+    tag: PullRequest.{BranchName}
+    increment: Inherit
+ignore:
+  sha: []
+merge-message-formats: {}

+ 53 - 35
Terminal.Gui/Terminal.Gui.csproj

@@ -1,39 +1,52 @@
 <Project Sdk="Microsoft.NET.Sdk">
 <Project Sdk="Microsoft.NET.Sdk">
+  <!-- =================================================================== -->
+  <!-- Version numbers -->
+  <!-- Automatically updated by gitversion (run `dotnet-gitversion /updateprojectfiles`)  -->
+  <!-- GitVersion.xml controls settings  -->
+  <!-- =================================================================== -->
+  <PropertyGroup>
+    <Version>2.0.0</Version>
+  </PropertyGroup>
+  <!-- =================================================================== -->
+  <!-- .NET Build Settings -->
+  <!-- =================================================================== -->
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>portable</DebugType>
     <DebugType>portable</DebugType>
+    <VersionSuffix></VersionSuffix>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DefineConstants>TRACE;DEBUG_IDISPOSABLE</DefineConstants>
     <DefineConstants>TRACE;DEBUG_IDISPOSABLE</DefineConstants>
     <DebugType>portable</DebugType>
     <DebugType>portable</DebugType>
-	<WarningsAsErrors>CS1574<!--,CA1034--></WarningsAsErrors>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup>
   <PropertyGroup>
-    <!-- Version numbers are automatically updated by gitversion when a release is released -->
-    <!-- In the source tree the version will always be 2.0 for all projects. -->
-    <!-- Do not modify these. Do NOT commit after manually running `dotnet-gitversion /updateprojectfiles` -->
-    <AssemblyVersion>2.0</AssemblyVersion>
-    <FileVersion>2.0</FileVersion>
-    <Version>2.0</Version>
-    <InformationalVersion>2.0</InformationalVersion>
+    <TargetFrameworks>net7.0</TargetFrameworks>
+    <LangVersion>10.0</LangVersion>
+    <RootNamespace>Terminal.Gui</RootNamespace>
+    <AssemblyName>Terminal.Gui</AssemblyName>
+    <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
   </PropertyGroup>
   </PropertyGroup>
+  <!-- =================================================================== -->
+  <!-- Dependencies -->
+  <!-- =================================================================== -->
   <ItemGroup>
   <ItemGroup>
-    <None Remove="Resources\config.json" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Resources\config.json" />
-  </ItemGroup>
-  <ItemGroup>
-    <!-- Enable Nuget Source Link for github -->
-    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
     <PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
     <PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
     <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
     <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
     <PackageReference Include="System.IO.Abstractions" Version="19.2.51" />
     <PackageReference Include="System.IO.Abstractions" Version="19.2.51" />
     <PackageReference Include="System.Text.Json" Version="7.0.3" />
     <PackageReference Include="System.Text.Json" Version="7.0.3" />
     <PackageReference Include="System.Management" Version="7.0.2" />
     <PackageReference Include="System.Management" Version="7.0.2" />
     <PackageReference Include="Wcwidth" Version="1.0.0" />
     <PackageReference Include="Wcwidth" Version="1.0.0" />
+    <!-- Enable Nuget Source Link for github -->
+    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
     <InternalsVisibleTo Include="UnitTests" />
     <InternalsVisibleTo Include="UnitTests" />
-   </ItemGroup>
+  </ItemGroup>
+  <PropertyGroup>
+    <!-- Uncomment the RestoreSources element to have dotnet restore pull NStack from a local dir for testing -->
+    <!-- See https://stackoverflow.com/a/44463578/297526 -->
+    <!--<RestoreSources>$(RestoreSources);..\..\NStack\NStack\bin\Debug;https://api.nuget.org/v3/index.json</RestoreSources>-->
+  </PropertyGroup>
+  <!-- =================================================================== -->
   <!-- API Documentation -->
   <!-- API Documentation -->
+  <!-- =================================================================== -->
   <ItemGroup>
   <ItemGroup>
     <None Include="..\docfx\images\logo.png">
     <None Include="..\docfx\images\logo.png">
       <Pack>True</Pack>
       <Pack>True</Pack>
@@ -44,6 +57,9 @@
       <PackagePath>\</PackagePath>
       <PackagePath>\</PackagePath>
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
+  <!-- =================================================================== -->
+  <!-- i18 -->
+  <!-- =================================================================== -->
   <ItemGroup>
   <ItemGroup>
     <Compile Update="Resources\Strings.Designer.cs">
     <Compile Update="Resources\Strings.Designer.cs">
       <DesignTime>True</DesignTime>
       <DesignTime>True</DesignTime>
@@ -57,35 +73,37 @@
       <LastGenOutput>Strings.Designer.cs</LastGenOutput>
       <LastGenOutput>Strings.Designer.cs</LastGenOutput>
     </EmbeddedResource>
     </EmbeddedResource>
   </ItemGroup>
   </ItemGroup>
+  <!-- =================================================================== -->
+  <!-- Nuget  -->
+  <!-- =================================================================== -->
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>net7.0</TargetFrameworks>
-    <LangVersion>10.0</LangVersion>
-    <RootNamespace>Terminal.Gui</RootNamespace>
-    <AssemblyName>Terminal.Gui</AssemblyName>
-    <DocumentationFile>bin\Release\Terminal.Gui.xml</DocumentationFile>
-    <GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
-    <!--<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>-->
     <PackageId>Terminal.Gui</PackageId>
     <PackageId>Terminal.Gui</PackageId>
     <PackageLicenseExpression>MIT</PackageLicenseExpression>
     <PackageLicenseExpression>MIT</PackageLicenseExpression>
     <PackageProjectUrl>https://github.com/gui-cs/Terminal.Gui/</PackageProjectUrl>
     <PackageProjectUrl>https://github.com/gui-cs/Terminal.Gui/</PackageProjectUrl>
-    <RepositoryUrl>https://github.com/gui-cs/Terminal.Gui.git</RepositoryUrl>
-    <RepositoryType>git</RepositoryType>
-    <IncludeSymbols>true</IncludeSymbols>
-    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
-    <!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
-    <PublishRepositoryUrl>true</PublishRepositoryUrl>
-    <!-- Embed source files that are not tracked by the source control manager in the PDB -->
-    <EmbedUntrackedSources>true</EmbedUntrackedSources>
     <PackageIcon>logo.png</PackageIcon>
     <PackageIcon>logo.png</PackageIcon>
     <PackageReadmeFile>README.md</PackageReadmeFile>
     <PackageReadmeFile>README.md</PackageReadmeFile>
     <PackageTags>csharp, terminal, c#, f#, gui, toolkit, console, tui</PackageTags>
     <PackageTags>csharp, terminal, c#, f#, gui, toolkit, console, tui</PackageTags>
     <Description>Cross platform Terminal UI toolkit for .NET</Description>
     <Description>Cross platform Terminal UI toolkit for .NET</Description>
-    <Owners>Miguel de Icaza, Charlie Kindel</Owners>
+    <Owners>Miguel de Icaza, Tig Kindel</Owners>
     <Summary>A toolkit for building rich console apps for .NET that works on Windows, Mac, and Linux/Unix.</Summary>
     <Summary>A toolkit for building rich console apps for .NET that works on Windows, Mac, and Linux/Unix.</Summary>
     <Title>Terminal.Gui - Cross platform Terminal User Interface (TUI) toolkit for .NET</Title>
     <Title>Terminal.Gui - Cross platform Terminal User Interface (TUI) toolkit for .NET</Title>
     <PackageReleaseNotes>
     <PackageReleaseNotes>
       See: https://github.com/gui-cs/Terminal.Gui/releases
       See: https://github.com/gui-cs/Terminal.Gui/releases
     </PackageReleaseNotes>
     </PackageReleaseNotes>
+    <DocumentationFile>bin\Release\Terminal.Gui.xml</DocumentationFile>
+    <GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Debug' ">true</GeneratePackageOnBuild>
+    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
+    <RepositoryUrl>https://github.com/gui-cs/Terminal.Gui.git</RepositoryUrl>
+    <RepositoryType>git</RepositoryType>
+    <IncludeSymbols>true</IncludeSymbols>
+    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
+    <!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
+    <PublishRepositoryUrl>true</PublishRepositoryUrl>
+    <!-- Embed source files that are not tracked by the source control manager in the PDB -->
+    <GitRepositoryRemoteName>upstream</GitRepositoryRemoteName>
+    <EmbedUntrackedSources>true</EmbedUntrackedSources>
+    <EnableSourceLink>true</EnableSourceLink>
+    <!--<DebugType>Embedded</DebugType>-->
+    <Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
   </PropertyGroup>
   </PropertyGroup>
-  <ProjectExtensions><VisualStudio><UserProperties resources_4config_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
-</Project>
+</Project>

+ 2 - 0
Terminal.sln

@@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
 		CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
 		CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
 		CONTRIBUTING.md = CONTRIBUTING.md
 		CONTRIBUTING.md = CONTRIBUTING.md
 		.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
 		.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
+		GitVersion.yml = GitVersion.yml
+		global.json = global.json
 		.github\workflows\publish.yml = .github\workflows\publish.yml
 		.github\workflows\publish.yml = .github\workflows\publish.yml
 		README.md = README.md
 		README.md = README.md
 		Terminal.sln.DotSettings = Terminal.sln.DotSettings
 		Terminal.sln.DotSettings = Terminal.sln.DotSettings

+ 2 - 2
global.json

@@ -1,6 +1,6 @@
 {
 {
   "sdk":{
   "sdk":{
-    "version":"6.0.100",
-    "rollForward":"latestMajor"
+    "version":"7.0.200",
+    "rollForward":"latestMinor"
   }
   }
 }
 }