fixed copy if version is already uploaded

This commit is contained in:
Stefan Hoffmann 2023-06-02 20:01:50 +02:00
parent 8d77819f57
commit d86d54d2ec
Signed by: stefan
GPG Key ID: 8EFC7042BF8D5CDD
2 changed files with 12 additions and 7 deletions

View File

@ -21,7 +21,7 @@ func main() {
br := *branch
version := readVersions(*branch)
var source_dir_branch string = sdir + br + "/images/"
var target_dir_branch string = tdir + br + "/images/"
var target_dir_branch string = tdir + br + "/"
if is_firmware_folder(source_dir_branch) {
//generate manifest file for branch

View File

@ -19,13 +19,18 @@ func release_branch(b string, sDir string, tDir string, dryrun bool, v string) {
}
sVersion := GetGluonVersion(sDir)
tVersion := GetGluonVersion(tDir)
fmt.Println("Target Version: ", tVersion)
fmt.Println("Source Version: ", sVersion)
fmt.Println("Wanted Version: ", v)
//check wanted version in target
if tVersion != v {
log.Println("published version is outdated, try to update from source folder")
if sVersion != v {
log.Println("wanted Version is not availible in source folder")
os.Exit(1)
}
if tVersion == v {
log.Println("wanted version is already published!")
os.Exit(0)
}
log.Println("published version is outdated, try to update from source folder")
if sVersion != v {
log.Println("wanted Version is not availible in source folder")
os.Exit(1)
}
if newImages {