diff --git a/Makefile b/Makefile index db1728ce..9f37e701 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ TEST_IMAGE ?= packit-dashboard-tests TEST_TARGET ?= ./tests/ CONTAINER_ENGINE ?= $(shell command -v podman 2> /dev/null || echo docker) API_STG = "https://stg.packit.dev/api" +GIT_SHA_FETCH := $(shell git rev-parse HEAD) +export GIT_SHA=$(GIT_SHA_FETCH) install-dependencies: .install-logos sudo dnf -y install python3-flask yarnpkg npm @@ -17,7 +19,7 @@ install-dependencies: .install-logos # this will transpile jsx into js, minify everything and generate static js for production builds transpile-prod: - cd frontend && REACT_APP_API_URL=$(API_STG) yarn run build + cd frontend && REACT_APP_GIT_SHA=$(GIT_SHA) REACT_APP_API_URL=$(API_STG) yarn run build # For Development Mode Only: @@ -29,7 +31,7 @@ transpile-prod: # if you change flask port for dev, also change it in frontend/package.json in the proxy key/value run-dev-frontend: - cd frontend && REACT_APP_API_URL=$(API_STG) GENERATE_SOURCEMAP=true HTTPS=true yarn start + cd frontend && REACT_APP_GIT_SHA=$(GIT_SHA) REACT_APP_API_URL=$(API_STG) GENERATE_SOURCEMAP=true HTTPS=true yarn start run-dev-flask: FLASK_ENV=development FLASK_APP=packit_dashboard.app flask-3 run --host=0.0.0.0 diff --git a/frontend/public/index.html b/frontend/public/index.html index 1ac71931..a687cf31 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -28,6 +28,7 @@ +