-
Notifications
You must be signed in to change notification settings - Fork 102
Add env variables for make dev target #1069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Makefile
Outdated
| dev: ## Run agent executable | ||
| @echo "🚀 Running App" | ||
| $(GORUN) -ldflags=$(DEBUG_LDFLAGS) $(PROJECT_DIR)/$(PROJECT_FILE) | ||
| COLLECTOR_CONFIG_PATH=$(COLLECTOR_PATH) MANIFEST_DIR_PATH=$(MANIFEST_DIR) $(GORUN) -ldflags=$(DEBUG_LDFLAGS) $(PROJECT_DIR)/$(PROJECT_FILE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| COLLECTOR_CONFIG_PATH=$(COLLECTOR_PATH) MANIFEST_DIR_PATH=$(MANIFEST_DIR) $(GORUN) -ldflags=$(DEBUG_LDFLAGS) $(PROJECT_DIR)/$(PROJECT_FILE) | |
| NGINX_AGENT_COLLECTOR_CONFIG_PATH=$(COLLECTOR_PATH) NGINX_AGENT_MANIFEST_DIR_PATH=$(MANIFEST_DIR) $(GORUN) -ldflags=$(DEBUG_LDFLAGS) $(PROJECT_DIR)/$(PROJECT_FILE) |
Shouldn't the env variables have the NGINX_AGENT_ prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be wrong, but does viper not do this automatically in the registerFlags method in config.go:
viperInstance.SetEnvPrefix(EnvPrefix)
Proposed changes
make devtargetfile_manager_service.goChecklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)