move images to archive if stable
This commit is contained in:
parent
b87065b548
commit
72430a2d8e
@ -35,6 +35,13 @@ func release_branch(b string, sDir string, tDir string, dryrun bool, v string) {
|
||||
|
||||
if newImages {
|
||||
// delete old firmware files in public folder
|
||||
// if we are in stable branch, move images to archive
|
||||
if b == "stable" {
|
||||
err := os.Rename(tDir+"/"+b, tDir+"/archive/v")
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
} else {
|
||||
for _, file := range check_tDir {
|
||||
if !(dryrun) {
|
||||
err := os.RemoveAll(tDir + file.Name())
|
||||
@ -47,6 +54,7 @@ func release_branch(b string, sDir string, tDir string, dryrun bool, v string) {
|
||||
log.Println("DRYRUN: delete folder :", file.Name())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//move new files to folder
|
||||
for _, file := range check_sDir {
|
||||
|
Loading…
Reference in New Issue
Block a user