28 lines
583 B
Go
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"))
|
|
|
|
}
|