oc-version/publish/occonst/variables.go

19 lines
397 B
Go
Raw Normal View History

2024-09-13 14:49:49 +02:00
package occonst
import (
"os"
)
var PUBLISH_URL = getenv("PUBLISH_URL", "https://cloud.o-forge.io")
var PUBLISH_REPO = getenv("PUBLISH_REPO", "core/oc-version")
var PUBLISH_TOKEN = getenv("PUBLISH_TOKEN", "")
var PUBLISH_BRANCH = getenv("PUBLISH_BRANCH", "main")
func getenv(key string, defaut string) string {
value := os.Getenv(key)
if len(value) == 0 {
return defaut
}
return value
}