Here's just one of my little ideas, in large projects, we're used to compiling our systems in a command line style, such as compiling a. NET program with Nant, but I'm thinking that if you build it once, the version number plus 1 is fine, not the. NET itself. With that addition, I came up with a small script that uses PowerShell to define a version control, as follows:
$ver="ver.cs"
$s=[System.IO.File]::ReadAllLines($ver)
if($s.Length - eq 2){
$num=$s[1].Remove(0, 28).Remove(7, 3).Split('.')
$sum=$num[0]+$num[1]+$num[2]+$num[3]
$result=$sum -as [Int32]
$r=$result+1
$results=$r.ToString();
write-host Current Version: $results
$build="[assembly: AssemblyVersion ("""
+$results[0]+"."
+$results[1]+"."
+$results[2]+"."
+$results[3]+""")]"
$s="using System.Reflection;",$build
[System.IO.File]::WriteAllLines($ver,$s)
}
Where Ver.cs is a C # file with only version-controlled code:
using System.Reflection;
[assembly: AssemblyVersion("1.0.0.0")]
Then, in the batch of your build, execute this script, and the 1.0.0.0 in Ver.cs will automatically add 10% to 1.0.0.1, and of course, the script can be arbitrarily changed so you can define the version you want to automatically grow.
Welcome to the brick, if you have your own version control mode, you can share under. This is just my own creativity, I think it is not the best, so when the start ...