コード例 #1
0
        public void TestMethod1()
        {
            var executeSetting = new ExecuteSetting("./");
            executeSetting.ForWidnow();
            var commandSet = new CommandSet(executeSetting);

            commandSet.Svn("svn_sample")
                .Url("http://svn.address.com/trunk")
                .Auth("username", "password")
                .Tags("tag1", "tab2")
                .WorkingCopy("workongfolder")
                .Tags("tag1", "tag2");

            var manager = new SettingManager();
            manager.Save(commandSet, "svn.ini", true);

            Assert.IsTrue(File.Exists("svn.ini"));

            var target = new CommandSet(new ExecuteSetting("./"));
            manager.ReadSetting(target, "svn.ini");

            var setting = (SvnSetting)target.Settings.First();

            Assert.AreEqual("http://svn.address.com/trunk", setting.Url);
            Assert.AreEqual("username", setting.UserName);
            Assert.AreEqual("password", setting.Password);
            Assert.AreEqual("tag1,tag2", String.Join(",", setting.Tags));
            Assert.AreEqual("workongfolder", setting.WorkingCopy);
            Assert.AreEqual("svn_sample", setting.Id);
        }
コード例 #2
0
        public override bool Handle(CommandSet commandSet, string fileName, string argument)
        {
            commandSet.Svn("svn_sample")
                .Url("http://svn.address.com/trunk")
                .Auth("username", "password")
                .Tags("tag1","tab2")
                .WorkingCopy("workongfolder")
                .Tags("tag1", "tag2")
                ;

            commandSet
                .Build(true, "compileSample")
                .Dependency("svn_sample")
                .Tags("tag2", "tab3")
                .Release()
                .ProjectPath("/mypathfor.csproj")
                .CopyTo("publish/%prjName%");

            commandSet
                .CopyTo("publishFolder_or_network_path", "copySample")
                .Auth("networkPath_username", "networkPath_password")
                 .Dependency("compileSample")
                .Tags("tag4", "tab5")
                ;

            var manager = new SettingManager();
            manager.Save(commandSet, fileName, true);
            return false;
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: luqizheng/lb_releaseIt
 private static void commandSet_OnCommandSettingChanged(object sender, EventArgs e)
 {
     var manager = new SettingManager();
     manager.Save(ExistFile, (CommandSet) sender, _fileInfo.FullName);
 }