private MakeStep Release() { Process process = ProcessHelper.Execute($"ionic build --release {Enum.GetName(typeof(Platforms), Platform)}"); //Read Standard OutPut MakeStep stepResult = new MakeStep(Steps.Build); ProcessHelper.FillStepInfo(stepResult, process);//Fill Process Detials to Step return(stepResult); }
private MakeStep ZipAlign(string outputPackageName) { MakeStep zipAlignStep = new MakeStep(Steps.ZipAlign); string zipAlignCommand = $"zipalign -v 4 {ApkAddress} {outputPackageName}.apk"; Process zipAlegnProcess = ProcessHelper.Execute(zipAlignCommand); ProcessHelper.FillStepInfo(zipAlignStep, zipAlegnProcess); if (!zipAlignStep.Message.Contains("Verification succesful")) { zipAlignStep.Status = false; } return(zipAlignStep); }
public static void FillStepInfo(MakeStep step, Process process) { string processLog = process.StandardOutput.ReadToEnd(); if (string.IsNullOrEmpty(processLog))//there is an error for Siging the apk { step.Status = false; processLog = process.StandardError.ReadToEnd(); } step.Message = processLog; step.ExecutionTime = process.TotalProcessorTime; step.StartTime = process.StartTime; step.EndTime = process.ExitTime; }
public override MakeStatus Build(string outputPackageName) { Platform = Platforms.Android; MakeStatus result = base.Build(outputPackageName); if (result.Steps[0].Status)//If Build Successed then go for sign { MakeStep signStep = Sign(); result.Steps.Add(signStep); if (signStep.Status)//if sign successed then go for zip align { result.Steps.Add(ZipAlign(outputPackageName)); } } return(result); }