public void PerformUpdate(string fl, FileUpdateType fut) { string versonToWrite = cv.GetVersionString(cv.GetDisplayType(fut)); Bilge.VerboseLog($"Perform update requested {versonToWrite} using {fut.ToString()}", fl); switch (fut) { case FileUpdateType.Assembly4: case FileUpdateType.Assembly2: UpdateCSFileWithAttribute(fl, ASMFILE_VER_TAG, versonToWrite); break; case FileUpdateType.AssemblyInformational: UpdateCSFileWithAttribute(fl, ASMFILE_INFVER_TAG, versonToWrite); break; case FileUpdateType.AssemblyFile: UpdateCSFileWithAttribute(fl, ASMFILE_FILEVER_TAG, versonToWrite); break; case FileUpdateType.Wix: Bilge.Log("Wix Updates NOT SUPPORTED"); break; default: break; } }
public void PerformUpdate(string fl, FileUpdateType fut, DisplayType dt = DisplayType.Default) { b.Verbose.Log("Perform update requested " + fut.ToString(), fl); if (!File.Exists(fl)) { throw new FileNotFoundException($"Filename must be present for version update {fl}"); } var dtx = cv.GetDisplayType(fut, dt); string versonToWrite = cv.GetVersionString(dtx); switch (fut) { case FileUpdateType.NetAssembly: UpdateCSFileWithAttribute(fl, ASMFILE_VER_TAG, versonToWrite); break; case FileUpdateType.NetInformational: UpdateCSFileWithAttribute(fl, ASMFILE_INFVER_TAG, versonToWrite); break; case FileUpdateType.NetFile: UpdateCSFileWithAttribute(fl, ASMFILE_FILEVER_TAG, versonToWrite); break; case FileUpdateType.Wix: UpdateWixFile(fl, versonToWrite); break; case FileUpdateType.Nuspec: UpdateNuspecFile(fl, versonToWrite); break; case FileUpdateType.StdAssembly: UpdateStdCSPRoj(fl, versonToWrite, ASM_STD_ASMVTAG); break; case FileUpdateType.StdFile: UpdateStdCSPRoj(fl, versonToWrite, ASM_STD_FILETAG); break; case FileUpdateType.StdInformational: UpdateStdCSPRoj(fl, versonToWrite, ASM_STD_VERSTAG); break; case FileUpdateType.TextFile: UpdateLiteralReplacer(fl, cv, dtx); break; default: throw new NotImplementedException("The file type requested does not have a way to update files currently."); } }