コード例 #1
0
ファイル: Class1.cs プロジェクト: perploug/cshake
        public override void ExecuteTask(Core.IContext ctx)
        {
            try
            {
                Repository source = null;

                using (var rs = new RepositoryStorage())
                {
                    source = rs.GetByAlias(Source);
                }

                var engine = new RevisionPackaging(Revision);
                engine.Source = source;

                engine.StoredItem += new EventHandler<ItemEventArgs>(engine_StoredItem);
                engine.SkippedItem += new EventHandler<ItemEventArgs>(engine_SkippedItem);

                _ctx.Important("Loading manifest...");
                var manifest = RevisionManifest.Load(Manifest);
                engine.AddToQueue(manifest);

                _ctx.Important("Starting packaging...");
                engine.Package();
                engine.Dispose();

                _ctx.Success("All done, yay!");
            }
            catch (Exception ex)
            {
                _ctx.Error(ex);
            }
        }
コード例 #2
0
ファイル: Package.cs プロジェクト: jayvin/Courier
        protected override void ExecuteTask()
        {
            Console.WriteLine("Application: " + application);
            Console.WriteLine("Config: " + Config);
            Console.WriteLine("plugins: " + plugins);

            init();

            Repository target = null;
            Repository source = null;

            using (var rs = new RepositoryStorage()){
                source = rs.GetByAlias(Source);

                if (!string.IsNullOrEmpty(Target))
                {
                    target = rs.GetByAlias(Target);
                }
            }

            var engine = new RevisionPackaging(Revision);

            engine.Source = source;


            engine.StoredItem  += new EventHandler <ItemEventArgs>(engine_StoredItem);
            engine.SkippedItem += new EventHandler <ItemEventArgs>(engine_SkippedItem);

            if (target != null)
            {
                Console.WriteLine("Enabling compare....");
                engine.EnableInstantCompare(target);
            }

            Console.WriteLine("Loading manifest...");
            var manifest = RevisionManifest.Load(Manifest);

            engine.AddToQueue(manifest);

            Console.WriteLine("Starting packaging...");
            engine.Package();
            engine.Dispose();

            Console.ResetColor();

            Console.WriteLine("All done, yay!");
        }
コード例 #3
0
ファイル: Package.cs プロジェクト: jayvin/Courier
        protected override void ExecuteTask()
        {
            Console.WriteLine("Application: " + application);
            Console.WriteLine("Config: " + Config);
            Console.WriteLine("plugins: " + plugins);

            init();

            Repository target = null;
            Repository source = null;

            using(var rs = new RepositoryStorage()){
                source = rs.GetByAlias(Source);

                if(!string.IsNullOrEmpty(Target))
                    target = rs.GetByAlias(Target);
            }

            var engine = new RevisionPackaging(Revision);
            engine.Source = source;

            engine.StoredItem += new EventHandler<ItemEventArgs>(engine_StoredItem);
            engine.SkippedItem += new EventHandler<ItemEventArgs>(engine_SkippedItem);

            if (target != null)
            {
                Console.WriteLine("Enabling compare....");
                engine.EnableInstantCompare(target);
            }

            Console.WriteLine("Loading manifest...");
            var manifest = RevisionManifest.Load( Manifest );
            engine.AddToQueue(manifest);

            Console.WriteLine("Starting packaging...");
            engine.Package();
            engine.Dispose();

            Console.ResetColor();

            Console.WriteLine("All done, yay!");
        }