Skip to content

Commit

Permalink
build: launch with no prompts from make rule
Browse files Browse the repository at this point in the history
This change moves the options to launch with no prompts to
the make rules.

By default use the options commonly used for development
but could be customized.

Inspired by: #77

Signed-off-by: Alejandro Visiedo <[email protected]>
  • Loading branch information
avisiedo authored and pvoborni committed Jun 20, 2024
1 parent 83c0b76 commit 4e5200c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"lint:prettier": "prettier --check src",
"patch:hosts": "fec patch-etc-hosts",
"start": "HOT=true fec dev",
"start-beta": "HOT=true fec dev --clouddotEnv=stage --uiEnv=beta",
"test": "TZ=UTC jest --verbose --no-cache",
"test-watch": "TZ=UTC jest --watch",
"postinstall": "ts-patch install && rimraf .cache",
Expand Down
10 changes: 8 additions & 2 deletions scripts/mk/crc-frontend.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ prettier: $(NODE_BIN)/prettier ## Make code prettier
test: $(NODE_BIN)/jest ## Execute unit tests
npm run test

$(eval NPM_RUN_START:=npm run start)
ifneq (,$(findstring $(CLOUDDOT_ENV),stage prod))
ifneq (,$(findstring $(UI_ENV),beta stable))
$(eval NPM_RUN_START:=npm run start -- --clouddotEnv="$(CLOUDDOT_ENV)" --uiEnv="$(UI_ENV)")
endif
endif
.PHONY: run
run:$(NODE_BIN)/fec ## Execute frontend
npm run start
run: $(NODE_BIN)/fec ## Execute frontend
$(NPM_RUN_START)

.PHONY: generate-api
generate-api: $(NODE_BIN)/openapi-generator-cli $(NODE_BIN)/prettier $(PUBLIC_OPENAPI) ## Generate the API client from openapi specification
Expand Down
3 changes: 3 additions & 0 deletions scripts/mk/variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@

APP_NAME := idmsvc

# Determine the default run environment
CLOUDDOT_ENV ?= stage
UI_ENV ?= beta

0 comments on commit 4e5200c

Please sign in to comment.