Пример #1
0
        public void AddEnvironmentVariables()
        {
            var localRoot = suiteRoot as LocalFileSystemDirectory;

            if (localRoot != null)
            {
                var output = RunGit(localRoot.AbsolutePath, "describe");
                log.Debug(output);
                if (output != null)
                {
                    var parts = output.Split('-');
                    if (parts.Length >= 2)
                    {
                        environmentVariableContext.Define("GIT_TAG", parts[0]);
                        environmentVariableContext.Define("GIT_REVNO", parts[1]);
                    }
                }
            }
        }
Пример #2
0
        public void AddEnvironmentVariables()
        {
            var localRoot = suiteRoot as LocalFileSystemDirectory;

            if (localRoot != null)
            {
                var logCommand = new LogCommand().WithRevision(RevSpec.WorkingDirectoryParent);
                Client.Execute(localRoot.AbsolutePath, logCommand);
                var    changeSet = logCommand.Result.First();
                string revNo     = changeSet.RevisionNumber.ToString(CultureInfo.InvariantCulture);
                log.DebugFormat("Mercurial current revision number is {0}", revNo);
                environmentVariableContext.Define("HG_REVNO", revNo);
            }
        }
Пример #3
0
 public void Define(string name, string value)
 {
     baseImpl.Define(name, value);
 }
Пример #4
0
 public void Define(string name, string value)
 {
     environmentVariableContext.Define(name, value);
 }