go-gluon-publisher/main.go

29 lines
758 B
Go
Raw Normal View History

2023-05-29 19:33:50 +00:00
package main
import (
"flag"
"log"
_ "github.com/codingsince1985/checksum"
)
func main() {
var source_dir = flag.String("source_dir", "./", "Path to image folder (/srv/fwuploads-tmp/)")
2023-05-29 20:18:37 +00:00
var target_dir = flag.String("target_dir", "./", "Path to image folder in public (/srv/fwuploads/troisdorf)")
var branch = flag.String("branch", "", "Branch to work with")
2023-05-29 19:33:50 +00:00
flag.Parse()
2023-05-29 20:18:37 +00:00
sdir := *source_dir
tdir := *target_dir
br := *branch
2023-05-29 20:27:28 +00:00
2023-05-29 20:18:37 +00:00
var source_dir_branch string = sdir + br + "/"
var target_dir_branch string = tdir + br + "/"
2023-05-29 20:27:28 +00:00
//generate manifest file for branch
2023-05-29 20:18:37 +00:00
err := generate_manifest(source_dir_branch)
2023-05-29 19:33:50 +00:00
if err != nil {
log.Println("Error generating Manifest file: ", err)
}
2023-05-29 20:18:37 +00:00
release_branch(*branch, source_dir_branch, target_dir_branch)
}