Browse Source

Fixes flubucore build

master
Savorboard 3 years ago
parent
commit
5d2807d6a1
1 changed files with 6 additions and 8 deletions
  1. +6
    -8
      build/BuildScript.Version.cs

+ 6
- 8
build/BuildScript.Version.cs View File

@@ -1,5 +1,4 @@
using System;
using System.IO;
using System.IO;
using System.Xml; using System.Xml;
using FlubuCore.Context; using FlubuCore.Context;
using FlubuCore.Scripting.Attributes; using FlubuCore.Scripting.Attributes;
@@ -11,7 +10,7 @@ namespace BuildScript
{ {
public BuildVersion FetchBuildVersion(ITaskContext context) 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(); XmlDocument doc = new XmlDocument();
doc.LoadXml(content); doc.LoadXml(content);
@@ -26,13 +25,12 @@ namespace BuildScript


bool isCi = false; bool isCi = false;
bool isTagged = false; bool isTagged = false;
if (!context.BuildSystems().IsLocalBuild)
if (!context.BuildServers().IsLocalBuild)
{ {
isCi = true; 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; isTagged = true;
} }


Loading…
Cancel
Save