diff --git a/.semver.txt b/.semver.txt index bb83058..5b09c67 100644 --- a/.semver.txt +++ b/.semver.txt @@ -1 +1 @@ -1.0.12 +1.0.14 diff --git a/release.cmd b/release.cmd index 3270f0a..72ecb84 100644 --- a/release.cmd +++ b/release.cmd @@ -14,6 +14,7 @@ set VERSION=%MAJOR:~0,1%.%MINOR:~0,1%.%PATCH1% echo %VERSION%>.semver.txt echo Updating to %VERSION% +call tools\SetVersion.cmd %VERSION% git add . git commit -m "%~1" diff --git a/src/JiraTimeBot/Properties/AssemblyInfo.cs b/src/JiraTimeBot/Properties/AssemblyInfo.cs index 4b69d38..69a93e1 100644 --- a/src/JiraTimeBot/Properties/AssemblyInfo.cs +++ b/src/JiraTimeBot/Properties/AssemblyInfo.cs @@ -1,35 +1,31 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("JiraTimeBot")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("JiraTimeBot")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.InteropServices; +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("JiraTimeBot")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JiraTimeBot")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.14")] +[assembly: AssemblyFileVersion("1.0.14")] +[assembly: AssemblyInformationalVersion("1.0.14")] diff --git a/tools/SetVersion.cmd b/tools/SetVersion.cmd new file mode 100644 index 0000000..a9d47ec --- /dev/null +++ b/tools/SetVersion.cmd @@ -0,0 +1,47 @@ +@echo off +setlocal enabledelayedexpansion + +if [%1] == [] GOTO :USAGE +set version=%1 +set fileversion=%1 +set informationalversion=%1 + +if [%2] NEQ [] SET fileversion=%2 +if [%3] NEQ [] SET informationalversion=%3 + +echo Setting assembly version information + +for /F "delims=" %%f in ('dir /s /b Assemblyinfo.cs') do ( + echo ^> %%f + + pushd %%~dpf + + for /F "usebackq delims=" %%g in ("AssemblyInfo.cs") do ( + set ln=%%g + set skip=0 + + if "!ln:AssemblyVersion=!" NEQ "!ln!" set skip=1 + if "!ln:AssemblyFileVersion=!" NEQ "!ln!" set skip=1 + if "!ln:AssemblyInformationalVersion=!" NEQ "!ln!" set skip=1 + + if !skip!==0 echo !ln! >> AssemblyInfo.cs.versioned + ) + + echo [assembly: AssemblyVersion^("%version%"^)] >> AssemblyInfo.cs.versioned + echo [assembly: AssemblyFileVersion^("%fileversion%"^)] >> AssemblyInfo.cs.versioned + echo [assembly: AssemblyInformationalVersion^("%informationalversion%"^)] >> AssemblyInfo.cs.versioned + + copy /y AssemblyInfo.cs AssemblyInfo.cs.orig + move /y AssemblyInfo.cs.versioned AssemblyInfo.cs + + popd +) +echo Done^^! + +GOTO:EOF + +:USAGE +echo Usage: +echo. +echo SetVersion.bat Version [FileVersion] [InformationalVersion] +echo. \ No newline at end of file diff --git a/tools/semverstain/svs.exe b/tools/semverstain/svs.exe deleted file mode 100644 index 52f7866..0000000 Binary files a/tools/semverstain/svs.exe and /dev/null differ