use SubWCRev from TortoiseSVN to get the repository's real revision number and use that

Version should be changed in AssemblyInfo.cs.in and AssemblyInfo.cs.template.

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1147 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
XhmikosR 2012-04-28 15:18:49 +00:00
parent c4c18a7d49
commit 9158e82104
6 changed files with 65 additions and 9 deletions

View File

@ -18,7 +18,7 @@ namespace Nikse.SubtitleEdit.Forms
string minorMinorVersion = string.Empty; string minorMinorVersion = string.Empty;
if (versionInfo.Length >= 3 && versionInfo[2] != "0") if (versionInfo.Length >= 3 && versionInfo[2] != "0")
minorMinorVersion = "." + versionInfo[2]; minorMinorVersion = "." + versionInfo[2];
labelProduct.Text = String.Format("{0} {1}.{2}{3}, build {4}", _languageGeneral.Title, versionInfo[0], versionInfo[1], minorMinorVersion, versionInfo[3]); labelProduct.Text = String.Format("{0} {1}.{2}{3} rev.{4}", _languageGeneral.Title, versionInfo[0], versionInfo[1], minorMinorVersion, versionInfo[3]);
richTextBoxAbout1.Text = _language.AboutText1.TrimEnd() + Environment.NewLine + richTextBoxAbout1.Text = _language.AboutText1.TrimEnd() + Environment.NewLine +
Environment.NewLine + Environment.NewLine +
_languageGeneral.TranslatedBy.Trim(); _languageGeneral.TranslatedBy.Trim();

View File

@ -0,0 +1,34 @@
using System.Reflection;
using System.Runtime.CompilerServices;
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("Subtitle Edit")]
[assembly: AssemblyDescription("Subtitle Edit")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Nikse")]
[assembly: AssemblyProduct("SubtitleEdit")]
[assembly: AssemblyCopyright("Nikse")]
[assembly: AssemblyTrademark("Licensed under the GPL v3")]
[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("8cb5792f-cd36-4dfb-b2fd-161e44be216d")]
// 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("3.2.8.$WCREV$")]

View File

@ -11,7 +11,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Nikse")] [assembly: AssemblyCompany("Nikse")]
[assembly: AssemblyProduct("SubtitleEdit")] [assembly: AssemblyProduct("SubtitleEdit")]
[assembly: AssemblyCopyright("Nikse")] [assembly: AssemblyCopyright("Nikse")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("Licensed under the GPL v3")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible // Setting ComVisible to false makes the types in this assembly not visible
@ -31,4 +31,4 @@ using System.Runtime.InteropServices;
// //
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("3.2.8.*")] [assembly: AssemblyVersion("3.2.8.0")]

View File

@ -1269,8 +1269,7 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PreBuildEvent> <PreBuildEvent>$(ProjectDir)..\update_rev.bat</PreBuildEvent>
</PreBuildEvent>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>COPY /Y /V "$(ProjectDir)Dlls\Hunspellx86.dll" "$(TargetDir)" <PostBuildEvent>COPY /Y /V "$(ProjectDir)Dlls\Hunspellx86.dll" "$(TargetDir)"

View File

@ -13,10 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProjectSection EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = SubtitleEdit.vsmdi CategoryFile = SubtitleEdit.vsmdi
EndGlobalSection EndGlobalSection
@ -37,4 +33,8 @@ Global
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
EndGlobal EndGlobal

23
update_rev.bat Normal file
View File

@ -0,0 +1,23 @@
@ECHO OFF
SETLOCAL
PUSHD %~dp0
SET "SUBWCREV=SubWCRev.exe"
"%SUBWCREV%" . "src\Properties\AssemblyInfo.cs.in" "src\Properties\AssemblyInfo.cs" -f
IF %ERRORLEVEL% NEQ 0 GOTO NoSubWCRev
GOTO END
:NoSubWCRev
ECHO. & ECHO SubWCRev, which is part of TortoiseSVN, wasn't found!
ECHO You should (re)install TortoiseSVN.
ECHO I'll use VERSION_REV=0 for now.
TYPE "src\Properties\AssemblyInfo.cs.template" > "src\Properties\AssemblyInfo.cs"
:END
POPD
ENDLOCAL
EXIT /B