Ejemplo n.º 1
0
        protected override void ProcessRecord()
        {
            string[] _envList = new string[7] { "ASY", "E2E", "TST1", "TST2", "TRN", "PRE", "PRD" };

            try
            {
                if (!_getEnvListOnly)
                {
                    TFS _tfs = new TFS();
                    ZipHelper _zh = new ZipHelper();

                    DirectoryInfo _wMTFVC = new DirectoryInfo(@"C:\temp\TFVCwmPackages");
                    _tfs.GetFromTFVC("$/wMProjects/WmSourceControl", _wMTFVC.FullName);

                    foreach (string _env in _envList)
                    {
                        foreach (FileInfo _file in _wMTFVC.GetFiles("*.zip", SearchOption.AllDirectories))
                        {
                            _zh.UnZipFiles(_file.FullName, @"C:\Temp\wM\" + _env + @"\Packages\" + Path.GetFileNameWithoutExtension(_file.Name), null, false);
                        }
                    }
                }

                WriteObject(_envList);

            }
            catch (Exception _ex)
            {
                throw (_ex);
            }
        }
Ejemplo n.º 2
0
        protected override void ProcessRecord()
        {
            try
            {
                ZipHelper _zh = new ZipHelper();
                if (!_outputPath.Exists)
                {
                    Directory.CreateDirectory(_outputPath.FullName);
                }

                _zh.Unzip_wMCnf(_path2PackageZip.FullName, Path.Combine(_outputPath.FullName, "Config"));
            }
            catch (Exception)
            {
            }
        }