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 {
|
if newImages {
|
||||||
// delete old firmware files in public folder
|
// 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 {
|
for _, file := range check_tDir {
|
||||||
if !(dryrun) {
|
if !(dryrun) {
|
||||||
err := os.RemoveAll(tDir + file.Name())
|
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())
|
log.Println("DRYRUN: delete folder :", file.Name())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//move new files to folder
|
//move new files to folder
|
||||||
for _, file := range check_sDir {
|
for _, file := range check_sDir {
|
||||||
|
Loading…
Reference in New Issue
Block a user