oc-deploy/publish/main.go
2024-09-11 13:44:20 +00:00

28 lines
583 B
Go

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"))
}