From deee76a95450c8da2f4e312e44152a47fcb56f06 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Fri, 22 May 2020 17:03:19 -0400 Subject: [PATCH] Injects environment variables via npm script --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c33a6ef..cf2c6af 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,9 @@ "e2e-wf:db-setup": "docker exec -it backend pipenv run flask load-example-data", "e2e-wf:pb-setup": "docker exec -it pb pipenv run flask db upgrade", "e2e-wf": "npm run e2e-wf:stop && npm run e2e-wf:clean && npm run e2e-wf:build && npm run e2e-wf:start && npm run e2e-wf:db-upgrade && npm run e2e-wf:db-setup && npm run e2e-wf:pb-setup", - "ci": "npm run lint && npm run test:coverage && npm run e2e:with-wf && sonar-scanner" + "e2e:env": "cp src/index.html src/index.html.tmp && chmod +x ./docker/substitute-env-variables.sh && ./docker/substitute-env-variables.sh src/index.html", + "e2e:env-restore": "rm src/index.html && mv src/index.html.tmp src/index.html", + "ci": "npm run lint && npm run test:coverage && npm run e2e:env && npm run e2e:with-wf && npm run e2e:env-restore && sonar-scanner" }, "private": true, "dependencies": {