Esempio n. 1
0
        private void btnReleaseDemoBeta_Click(object sender, EventArgs e)
        {
            this.CheckForBadWebConfig();
            List <Tuple <Func <IReadOnlyCollection <string> >, string> > commands = new List <Tuple <Func <IReadOnlyCollection <string> >, string> >();

            commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.ClearFolder(this._PC_RootDemoBeta.Value, this.UpdateTaskStatus, this._Log, IORetries), "Clearing Demo/Beta"));
            commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.CopyFolder(this._PC_RootSource.Value, this._PC_RootDemoBeta.Value, this.UpdateTaskStatus, this._Log, IORetries), "Copying Build Source to Demo/Beta"));
            commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.CopyWebConfig(this._PC_ConfigDemoBeta.Value, this._PC_RootDemoBeta.Value, this.UpdateTaskStatus, this._Log, IORetries), "Copying web.config to Demo/Beta"));

            this.RunCommands("Releasing Demo/Beta", commands);
        }
Esempio n. 2
0
        private void btnReleaseLive_Click(object sender, EventArgs e)
        {
            /* Clear    Stable
             * Copy     Production-Clean        to Stable
             * Copy     Production-Clean        to Backups
             * Copy     Stable.config           to Stable
             * Clear    Production-Clean
             * Copy     Build Source            to Production-Clean
             * if(Clear-Production-Live)        then        Clear Production-Live
             * Copy     Build Source            to Production-Live
             * Copy     Production-Live.config  to Production-Live
             * /**/

            this.CheckForBadWebConfig();
            List <Tuple <Func <IReadOnlyCollection <string> >, string> > commands = new List <Tuple <Func <IReadOnlyCollection <string> >, string> >();

            if (this.chkReleaseLive_CopyCurrentReleaseToStable.Checked)
            {
                commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.ClearFolder(this._PC_RootStable.Value, this.UpdateTaskStatus, this._Log, IORetries), "Clearing Stable"));
                commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.CopyFolder(this._PC_RootProductionClean.Value, this._PC_RootStable.Value, this.UpdateTaskStatus, this._Log, IORetries), "Copying Production-Clean to Stable"));
                commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.CopyWebConfig(this._PC_ConfigStable.Value, this._PC_RootStable.Value, this.UpdateTaskStatus, this._Log, IORetries), "Copying web.config to Stable"));
            }
            commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.BackupFolder(this._PC_RootProductionClean.Value, this._PC_RootBackups.Value, this.UpdateTaskStatus, this._Log, IORetries), "Backing up Production-Clean"));
            commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.ClearFolder(this._PC_RootProductionClean.Value, this.UpdateTaskStatus, this._Log, IORetries), "Clearing Production-Clean"));
            commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.CopyFolder(this._PC_RootSource.Value, this._PC_RootProductionClean.Value, this.UpdateTaskStatus, this._Log, IORetries), "Copying Build Source to Production-Clean"));

            if (this.chkReleaseLive_CleanBeforeRelease.Checked)
            {
                commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.ClearFolder(this._PC_RootProductionLive.Value, this.UpdateTaskStatus, this._Log, IORetries), "Clearing Production-Live"));
            }

            commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.CopyFolder(this._PC_RootSource.Value, this._PC_RootProductionLive.Value, this.UpdateTaskStatus, this._Log, IORetries), "Copying Build Source to Production-Live"));
            if (this.chkReleaseLive_CleanAfterRelease.Checked)
            {
                commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.ClearExtraFiles(this._PC_RootSource.Value, this._PC_RootProductionLive.Value, this.UpdateTaskStatus, this._Log, IORetries), "Clearing extra files from Production-Live that don't exist in build source"));
            }
            commands.Add(new Tuple <Func <IReadOnlyCollection <string> >, string>(() => FileOperations.CopyWebConfig(this._PC_ConfigProductionLive.Value, this._PC_RootProductionLive.Value, this.UpdateTaskStatus, this._Log, IORetries), "Copying web.config to Production-Live"));

            this.RunCommands("Releasing Production-Live", commands);
        }