Save config file before commit
This commit is contained in:
14
src/main.go
14
src/main.go
@@ -211,6 +211,13 @@ func main() {
|
||||
// Обновляем файлы, указанные в конфигурации
|
||||
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, если требуется
|
||||
if shouldCommit {
|
||||
gitCommit(bc, newVersion)
|
||||
@@ -224,11 +231,4 @@ func main() {
|
||||
if *push {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user