init
This commit is contained in:
		
							
								
								
									
										18
									
								
								publish/occonst/variables.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								publish/occonst/variables.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| 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 | ||||
| } | ||||
		Reference in New Issue
	
	Block a user