-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
25 lines (19 loc) · 853 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Example Makefile with most often used commands.
# loads .env file so that env variables are available in commands
include .env
export
init-pre-commit:
pip3 install pre-commit
pre-commit install
install-dependencies:
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install poetry
python3 -m poetry install -v --no-root --compile
# example ssh access command - configure via .env file
remote-ssh:
ssh -i $(PRIVATE_KEY_FILE_LOCATION) $(REMOTE_USER)@$(REMOTE_ADDRESS)
# example ssh deploy command - adds git deploy key to ssh agent and pulls newest version of main branch
DEPLOY_COMMAND=cd project && ssh-agent bash -c 'ssh-add ../git-deploy-key && git pull origin main && git checkout main && git status'
remote-deploy:
ssh -i $(PRIVATE_KEY_FILE_LOCATION) $(REMOTE_USER)@$(REMOTE_ADDRESS) \
"$(DEPLOY_COMMAND)"