oc-deploy/publish/main.go

28 lines
583 B
Go
Raw Normal View History

2024-09-11 15:44:20 +02:00
package main
import (
"fmt"
"os"
"oc-publish/releases"
)
func main() {
fmt.Println(" >> oc-publish :")
version := os.Args[1]
fmt.Println(fmt.Sprintf(" << version : %s", version))
existe, _ := releases.CheckRelease(version)
fmt.Println(fmt.Sprintf(" << existe : %t ", existe))
idRelease, _ := releases.GetReleaseId(version)
fmt.Println(fmt.Sprintf(" << id : %d ", idRelease))
idAsset, _ := releases.GetAssetId(idRelease, "oc.json")
fmt.Println(fmt.Sprintf(" << idAsset : %d ", idAsset))
fmt.Println(releases.CreateAsset(idRelease, "../bin/oc-deploy"))
}