Skip to content

Commit

Permalink
Add makefile targets to help with deployments (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamDudley authored Nov 20, 2024
1 parent c8fc4c3 commit 4b51dd5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,23 @@ db-dump: # Dump the current database, use `DUMP_NAME` to change the name of the

db-from-dump: # Load a dumped database, use `DUMP_NAME` to change the name of the dump
@PGPASSWORD='postgres' psql -h localhost -U postgres postgres -f ./.dumps/$(DUMP_NAME).dump


# platform-helper

# target specific variables (not global)
codebase-build codebase-deploy copilot-ssh: profile = "fft"
codebase-build codebase-deploy copilot-ssh: app = "fft"
codebase-build codebase-deploy copilot-ssh: codebase = "fft"
codebase-build codebase-deploy: commit := $(shell git rev-parse --short HEAD)
codebase-deploy: env = "dev"
copilot-ssh: name = "web"

codebase-build:
AWS_PROFILE=$(profile) platform-helper codebase build --app $(app) --codebase $(codebase) --commit $(commit)

codebase-deploy:
AWS_PROFILE=$(profile) platform-helper codebase deploy --app $(app) --codebase $(codebase) --commit $(commit) --env $(env)

copilot-ssh:
AWS_PROFILE=$(profile) copilot svc exec --app $(app) --env $(env) --name $(name) --command 'launcher bash'

0 comments on commit 4b51dd5

Please sign in to comment.