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)
|
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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user