Save config file before commit

This commit is contained in:
2025-04-04 01:08:12 +03:00
parent 93917649e6
commit ce98e2f482

View File

@@ -211,6 +211,13 @@ func main() {
// Обновляем файлы, указанные в конфигурации // Обновляем файлы, указанные в конфигурации
updateFiles(bc.FilePaths, bc.CurrentVersion, newVersion) updateFiles(bc.FilePaths, bc.CurrentVersion, newVersion)
// Обновляем конфигурационный файл
if err := updateConfigFile(cfg_name, newVersion); err != nil {
log.Printf("Error updating config file: %v", err)
} else {
log.Printf("Config file %s updated to version %s", cfg_name, newVersion)
}
// Выполняем git commit и tag, если требуется // Выполняем git commit и tag, если требуется
if shouldCommit { if shouldCommit {
gitCommit(bc, newVersion) gitCommit(bc, newVersion)
@@ -224,11 +231,4 @@ func main() {
if *push { if *push {
gitPush(bc, newVersion) gitPush(bc, newVersion)
} }
// Обновляем конфигурационный файл
if err := updateConfigFile(cfg_name, newVersion); err != nil {
log.Printf("Error updating config file: %v", err)
} else {
log.Printf("Config file %s updated to version %s", cfg_name, newVersion)
}
} }