예제 #1
0
        private static string BuildMsbuildScript(BuildData buildSection, string moduleName)
        {
            var tool       = FindTool(buildSection.Tool, moduleName);
            var parameters = (buildSection.Parameters.Count == 0 ? GetDefaultMsbuildParameters(buildSection.Tool.Version) : buildSection.Parameters).ToList();

            parameters.Add("/p:Configuration=" + buildSection.Configuration);
            parameters.Add(buildSection.Target);

            if (!Helper.OsIsUnix())
            {
                tool = "\"" + tool + "\"";
            }
            return(tool + " " + string.Join(" ", parameters));
        }
        public IEnumerable <string> GetCsprojList(BuildData buildData)
        {
            if (buildData.Target.EndsWith(".csproj"))
            {
                return new List <string> {
                           Path.Combine(cwd, buildData.Target)
                }
            }
            ;

            var guidToCsprojDict = GetGuidToCsprojDict();
            var guidSetForConfig = GetGuidSetForConfig(buildData.Configuration);

            return(guidSetForConfig.Where(guid => guidToCsprojDict.ContainsKey(guid)).Select(guid => guidToCsprojDict[guid]).ToList());
        }
예제 #3
0
 public BuildScriptWithBuildData(string script, string scriptIfFail, BuildData buildData)
 {
     Script       = script;
     ScriptIfFail = scriptIfFail;
     BuildData    = buildData;
 }
예제 #4
0
 public BuildScriptWithBuildData(string script, BuildData buildData)
 {
     Script    = script;
     BuildData = buildData;
 }
        public List <string> GetReferences(BuildData buildData)
        {
            var configCsprojList = GetCsprojList(buildData).Select(csproj => Path.Combine(cwd, csproj)).ToList();

            return(GetReferencesFromCsprojList(configCsprojList, buildData.Configuration));
        }