console: Automatically install node_modules.

When running `npm run server-build`, this step will make sure that `npm
ci` is run first if necessary.

It will run whenever _package.json_ or _package-lock.json_ are changed.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4624
GitOrigin-RevId: ac3fb326938746e50ad743504493896011d45f0f
This commit is contained in:
Samir Talwar 2022-06-03 14:39:26 +02:00 committed by hasura-bot
parent 056765578f
commit 807fdd7347

View File

@ -43,7 +43,7 @@ gcloud-set-metadata:
gsutil setmeta -h "Content-Type: text/css" gs://$(BUCKET_NAME)/console/$(VERSION)/*.css
gsutil setmeta -h "Content-Encoding: gzip" gs://$(BUCKET_NAME)/console/$(VERSION)/*
server-build: $(DIST_PATH)/common
server-build: node_modules $(DIST_PATH)/common
rm -rf "$(DIST_PATH)/versioned"
npm run build
mkdir -p "$(DIST_PATH)/versioned"
@ -54,3 +54,6 @@ $(DIST_PATH)/common:
mkdir -p $(DIST_PATH)
gsutil -m cp -r gs://$(BUCKET_NAME)/console/assets/common "$(DIST_PATH)"
touch $@
node_modules: package.json package-lock.json
npm ci