fix
This commit is contained in:
parent
f39f18a022
commit
2472c82f36
2 changed files with 6 additions and 6 deletions
BIN
api-server
BIN
api-server
Binary file not shown.
12
main.go
12
main.go
|
@ -10,19 +10,19 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func updateVersion(repoPath string, serviceName string) error {
|
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)
|
newVersion := getVersion(serviceName)
|
||||||
|
|
||||||
os.WriteFile(versionFile, []byte(newVersion), 0644)
|
|
||||||
|
|
||||||
versionPath := "version.txt"
|
|
||||||
if repoPath == "/data/alaskartv/androidtv-ci" {
|
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{
|
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, "commit", "-m", fmt.Sprintf("Bump version to %s", newVersion)},
|
||||||
{"git", "-C", repoPath, "push"},
|
{"git", "-C", repoPath, "push"},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue