mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
[ci] let's see if it works
This commit is contained in:
parent
37588eb75a
commit
6d8be650c7
@ -13,7 +13,6 @@ install:
|
|||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
- bash.exe "build\version.sh" .
|
|
||||||
- MSBuild.exe Aegisub.sln /target:BuildTasks
|
- MSBuild.exe Aegisub.sln /target:BuildTasks
|
||||||
- MSBuild.exe Aegisub.sln /m /p:Configuration=Release /p:Platform=x64
|
- MSBuild.exe Aegisub.sln /m /p:Configuration=Release /p:Platform=x64
|
||||||
|
|
||||||
|
@ -28,9 +28,10 @@ namespace BuildTasks {
|
|||||||
private const string versionHTemplate =
|
private const string versionHTemplate =
|
||||||
@"#define BUILD_GIT_VERSION_NUMBER {0}
|
@"#define BUILD_GIT_VERSION_NUMBER {0}
|
||||||
#define BUILD_GIT_VERSION_STRING ""{1}""
|
#define BUILD_GIT_VERSION_STRING ""{1}""
|
||||||
#define TAGGED_RELEASE {2}
|
#define RELEASE_VERSION ""{2}""
|
||||||
#define INSTALLER_VERSION ""{3}""
|
#define TAGGED_RELEASE {3}
|
||||||
#define RESOURCE_BASE_VERSION {4}
|
#define INSTALLER_VERSION ""{4}""
|
||||||
|
#define RESOURCE_BASE_VERSION {5}
|
||||||
";
|
";
|
||||||
private const string versionXmlTemplate =
|
private const string versionXmlTemplate =
|
||||||
@"<?xml version=""1.0"" encoding=""utf-8""?>
|
@"<?xml version=""1.0"" encoding=""utf-8""?>
|
||||||
@ -84,11 +85,25 @@ 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;
|
||||||
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();
|
||||||
|
|
||||||
foreach (var tag in repo.Tags) {
|
foreach (var tag in repo.Tags) {
|
||||||
|
if (releaseVersion == null) {
|
||||||
|
releaseVersion = tag;
|
||||||
|
} else {
|
||||||
|
var filter = = new CommitFilter()
|
||||||
|
{
|
||||||
|
IncludeReachableFrom = tag.Target.Sha,
|
||||||
|
ExcludeReachableFrom = releaseVersion.Target.Sha
|
||||||
|
};
|
||||||
|
|
||||||
|
if (repo.Commits.QueryBy(filter).ToList().size() == 0)
|
||||||
|
releaseVersion = tag;
|
||||||
|
}
|
||||||
|
|
||||||
if (!tag.Target.Id.Equals(repo.Head.Tip.Id)) continue;
|
if (!tag.Target.Id.Equals(repo.Head.Tip.Id)) continue;
|
||||||
|
|
||||||
taggedRelease = true;
|
taggedRelease = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user