mirror of https://github.com/odrling/Aegisub
get the right release version on windows
This commit is contained in:
parent
a08026ba41
commit
4b2f9d864a
|
@ -79,7 +79,7 @@ after_build:
|
||||||
- cd ..\..
|
- cd ..\..
|
||||||
|
|
||||||
on_success:
|
on_success:
|
||||||
- bash.exe ".ci\upload_win_installer.sh"
|
- IF DEFINED APPVEYOR_REPO_TAG_NAME bash.exe ".ci\upload_win_installer.sh"
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: packages\win_installer\output\Aegisub-Japan7-x64.exe
|
- path: packages\win_installer\output\Aegisub-Japan7-x64.exe
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace BuildTasks {
|
||||||
string installerVersion = "0.0.0";
|
string installerVersion = "0.0.0";
|
||||||
string resourceVersion = "0, 0, 0";
|
string resourceVersion = "0, 0, 0";
|
||||||
string versionStr = null;
|
string versionStr = null;
|
||||||
var releaseVersion = null;
|
Tag releaseVersion = null;
|
||||||
bool taggedRelease = false;
|
bool taggedRelease = false;
|
||||||
using (var repo = new Repository(Root + ".git")) {
|
using (var repo = new Repository(Root + ".git")) {
|
||||||
commits += repo.Commits.TakeWhile(c => !c.Id.Equals(LastSVNCommit)).Count();
|
commits += repo.Commits.TakeWhile(c => !c.Id.Equals(LastSVNCommit)).Count();
|
||||||
|
@ -96,11 +96,11 @@ namespace BuildTasks {
|
||||||
} else {
|
} else {
|
||||||
var filter = new CommitFilter()
|
var filter = new CommitFilter()
|
||||||
{
|
{
|
||||||
IncludeReachableFrom = tag.Target.Sha,
|
Since = tag.Target.Sha,
|
||||||
ExcludeReachableFrom = releaseVersion.Target.Sha
|
Until = releaseVersion.Target.Sha
|
||||||
};
|
};
|
||||||
|
|
||||||
if (repo.Commits.QueryBy(filter).ToList().Count == 0)
|
if (repo.Commits.QueryBy(filter).ToList().Count > 0)
|
||||||
releaseVersion = tag;
|
releaseVersion = tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ namespace BuildTasks {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteIfChanged(versionHPath, versionHTemplate, releaseVersion.Shorten(), commits, versionStr, taggedRelease ? "1" : "0", installerVersion, resourceVersion);
|
WriteIfChanged(versionHPath, versionHTemplate, commits, versionStr, releaseVersion.Name.TrimStart('v'), taggedRelease ? "1" : "0", installerVersion, resourceVersion);
|
||||||
WriteIfChanged(versionXmlPath, versionXmlTemplate, commits, versionStr);
|
WriteIfChanged(versionXmlPath, versionXmlTemplate, commits, versionStr);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue