瀏覽代碼

Fixes flubucore build

master
Savorboard 3 年之前
父節點
當前提交
5d2807d6a1
共有 1 個文件被更改,包括 6 次插入8 次删除
  1. +6
    -8
      build/BuildScript.Version.cs

+ 6
- 8
build/BuildScript.Version.cs 查看文件

@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using System.Xml;
using FlubuCore.Context;
using FlubuCore.Scripting.Attributes;
@@ -11,7 +10,7 @@ namespace BuildScript
{
public BuildVersion FetchBuildVersion(ITaskContext context)
{
var content = System.IO.File.ReadAllText(RootDirectory.CombineWith("build/version.props"));
var content = File.ReadAllText(RootDirectory.CombineWith("build/version.props"));

XmlDocument doc = new XmlDocument();
doc.LoadXml(content);
@@ -26,13 +25,12 @@ namespace BuildScript

bool isCi = false;
bool isTagged = false;
if (!context.BuildSystems().IsLocalBuild)
if (!context.BuildServers().IsLocalBuild)
{
isCi = true;
bool isTagAppveyor = context.BuildSystems().AppVeyor().IsTag;
if (context.BuildSystems().RunningOn == BuildSystemType.AppVeyor && isTagAppveyor ||
context.BuildSystems().RunningOn == BuildSystemType.TravisCI && string.IsNullOrWhiteSpace(context.BuildSystems().Travis().TagName))
bool isTagAppveyor = context.BuildServers().AppVeyor().IsTag;
if (context.BuildServers().RunningOn == BuildServerType.AppVeyor && isTagAppveyor ||
context.BuildServers().RunningOn == BuildServerType.TravisCI && string.IsNullOrWhiteSpace(context.BuildServers().Travis().TagName))
{
isTagged = true;
}


Loading…
取消
儲存