Compare commits

..

No commits in common. "b87065b548a36cdfce14bd18ecc62a3ce1f605b9" and "8d77819f575127b58a8ed8a94a7ecc198552b2b6" have entirely different histories.

3 changed files with 8 additions and 14 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
target*
source*
go-gluon-publish

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 + "/"
var target_dir_branch string = tdir + br + "/images/"
if is_firmware_folder(source_dir_branch) {
//generate manifest file for branch

View File

@ -19,18 +19,13 @@ 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("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 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 newImages {
@ -81,7 +76,7 @@ func GetGluonVersion(path string) string {
}
func readVersions(branch string) string {
filePath := "/srv/fwuploads-tmp/bin/release_state.json"
filePath := "release_state.json"
v, err := ioutil.ReadFile(filePath)
if err != nil {
log.Fatalln("Error reading version JSON file!")