Skip to content

Commit

Permalink
Update frontend references to use Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
punmechanic committed Feb 22, 2024
1 parent e43eb7a commit 0c84c01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./...
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0c84c01

Please sign in to comment.