Added env-file with godotenv to all non-base implementations of plugin

This commit is contained in:
Robert Stettner
2020-08-05 16:28:21 +01:00
parent d913d6e7dc
commit a5076e74dc
4 changed files with 28 additions and 0 deletions

View File

@@ -5,9 +5,16 @@ import (
"os"
"os/exec"
"strings"
"github.com/joho/godotenv"
)
func main() {
// Load env-file if it exists first
if env := os.Getenv("PLUGIN_ENV_FILE"); env != "" {
godotenv.Load(env)
}
var (
repo = getenv("PLUGIN_REPO")
registry = getenv("PLUGIN_REGISTRY")