Dont bump App version if same
This commit is contained in:
parent
4186d7fb3c
commit
f786c93d46
1 changed files with 6 additions and 6 deletions
12
main.go
12
main.go
|
@ -24,11 +24,6 @@ func updateVersion(repoPath string, serviceName string) (string, error) {
|
|||
botToken := os.Getenv("BOT_TOKEN")
|
||||
chatid := os.Getenv("CHAT_ID")
|
||||
|
||||
if serviceName == "alaskartv" {
|
||||
versionPath = fmt.Sprintf("%s/release.txt", repoPath)
|
||||
bumpVersionTv(repoPath)
|
||||
}
|
||||
|
||||
currentVersion, err := os.ReadFile(versionPath)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to read version file: %w", err)
|
||||
|
@ -50,6 +45,11 @@ func updateVersion(repoPath string, serviceName string) (string, error) {
|
|||
return string(jsonResponse), nil
|
||||
}
|
||||
|
||||
if serviceName == "alaskartv" {
|
||||
versionPath = fmt.Sprintf("%s/release.txt", repoPath)
|
||||
bumpVersionTv(repoPath)
|
||||
}
|
||||
|
||||
os.WriteFile(versionPath, []byte(newVersion), 0644)
|
||||
cmds := [][]string{
|
||||
{"git", "-C", repoPath, "add", "."},
|
||||
|
@ -83,7 +83,7 @@ func updateVersion(repoPath string, serviceName string) (string, error) {
|
|||
return "", fmt.Errorf("failed to marshal JSON: %w", err)
|
||||
}
|
||||
return string(jsonResponse), nil
|
||||
}
|
||||
}
|
||||
|
||||
func bumpVersionTv(repoPath string) {
|
||||
filePath := fmt.Sprintf("%s/version.txt", repoPath)
|
||||
|
|
Loading…
Reference in a new issue