diff --git a/api-server b/api-server index 5f3410b..f94f0b9 100755 Binary files a/api-server and b/api-server differ diff --git a/main.go b/main.go index d7395f7..f5d28e2 100644 --- a/main.go +++ b/main.go @@ -10,19 +10,19 @@ import ( ) func updateVersion(repoPath string, serviceName string) error { - versionFile := fmt.Sprintf("%s/version.txt", repoPath) + versionPath := fmt.Sprintf("%s/version.txt", repoPath) + versionFile := "version.txt" newVersion := getVersion(serviceName) - os.WriteFile(versionFile, []byte(newVersion), 0644) - - versionPath := "version.txt" if repoPath == "/data/alaskartv/androidtv-ci" { - versionPath = "release.txt" + versionPath = fmt.Sprintf("%s/release.txt", repoPath) + versionFile = "release.txt" } + os.WriteFile(versionPath, []byte(newVersion), 0644) cmds := [][]string{ - {"git", "-C", repoPath, "add", versionPath}, + {"git", "-C", repoPath, "add", versionFile}, {"git", "-C", repoPath, "commit", "-m", fmt.Sprintf("Bump version to %s", newVersion)}, {"git", "-C", repoPath, "push"}, }