mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
Make sure AssemblyInfo.cs exists when starting from scratch II
This commit is contained in:
parent
db350534cb
commit
7037fef9e9
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,3 +25,4 @@ SubtitleEdit-*-setup.exe
|
||||
/src/.nuget/NuGet.exe
|
||||
/src/.nuget/NuGet.Config
|
||||
/src/packages/
|
||||
/libse/Properties/AssemblyInfo.cs
|
||||
|
@ -71,8 +71,11 @@ namespace UpdateAssemblyInfo
|
||||
|
||||
private static VersionInfo GetOldVersionNumber(string subtitleEditTemplateFileName)
|
||||
{
|
||||
var version = new VersionInfo { Version = "1.0.0.0", RevisionGuid = "0" };
|
||||
var lines = File.ReadAllLines(subtitleEditTemplateFileName.Replace(".template", string.Empty));
|
||||
var version = new VersionInfo { Version = "1.0.0.0", RevisionGuid = "0", BuildNumber = "0" };
|
||||
var oldFileName = subtitleEditTemplateFileName.Replace(".template", string.Empty);
|
||||
if (File.Exists(oldFileName))
|
||||
{
|
||||
var lines = File.ReadAllLines(oldFileName);
|
||||
foreach (var line in lines)
|
||||
{
|
||||
var l = line.Trim();
|
||||
@ -106,9 +109,6 @@ namespace UpdateAssemblyInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(version.Version))
|
||||
{
|
||||
Console.WriteLine("WARNING: Could not find version number - will use 1.0.0");
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user