Example #1
0
        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);
            }
        }
Example #2
0
        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!");
        }
Example #3
0
        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!");
        }