From 0c84c019d99d6b98b9557ea0eb224b7c4883c3c0 Mon Sep 17 00:00:00 2001 From: Dan Pantry Date: Wed, 21 Feb 2024 18:05:58 -0800 Subject: [PATCH] Update frontend references to use Vite --- .gitignore | 2 +- Makefile | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index ae1d78dc..e399bf15 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ dev.env prod.env shared.env build/ -frontend/build/** +frontend/dist/** **/builds/** api/lambdas/get_aws_creds/get_aws_creds api/lambdas/get_user_data/get_user_data diff --git a/Makefile b/Makefile index dbd3ed62..1c6b4563 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,12 @@ all: build clean: rm -rf cli/keyconjurer* - rm -r frontend/build + rm -r frontend/dist test: frontend_test go_test CLI_TARGETS = cli/keyconjurer-darwin cli/keyconjurer-darwin-amd64 cli/keyconjurer-darwin-arm64 cli/keyconjurer-linux cli/keyconjurer-linux-amd64 cli/keyconjurer-linux-arm64 cli/keyconjurer-windows.exe -build: api_build frontend/build/index.html $(CLI_TARGETS) +build: api_build frontend/dist/index.html $(CLI_TARGETS) go_test: go test ./... @@ -28,11 +28,8 @@ frontend_test: frontend/node_modules: cd frontend && npm install -frontend/build/index.html: frontend/node_modules - mkdir -p build/frontend/ - cd frontend && \ - VITE_APP_VERSION='$(shell git rev-parse --short HEAD)-$(RELEASE)' \ - npm run-script build +frontend/dist/index.html: frontend/node_modules + VITE_APP_VERSION='$(shell git rev-parse --short HEAD)-$(RELEASE)' cd frontend && npm run-script build ### CLI Build Targets cli/keyconjurer-linux-arm64 cli/keyconjurer-linux: @@ -89,10 +86,10 @@ cli_upload: $(CLI_TARGETS) cd cli/ && \ aws s3 cp . s3://$(S3_FRONTEND_BUCKET_NAME)-$(RELEASE) --exclude "*" --include "keyconjurer*" --recursive -frontend_upload: frontend/build/index.html +frontend_upload: frontend/dist/index.html @test $${S3_FRONTEND_BUCKET_NAME?is not set} @test $${RELEASE?is not set} - cd frontend/build && \ + cd frontend/dist && \ aws s3 cp . s3://$(S3_FRONTEND_BUCKET_NAME)-$(RELEASE) --include "*" --recursive api_upload: build/list_applications.zip