-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (18 loc) · 748 Bytes
/
Makefile
File metadata and controls
24 lines (18 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
SHELL=/bin/bash
ACTIVE=When.php
SERVERNAME=stackr.test
#WORK_DIR=~/Outputs/git/stack-agents-prv
WORK_DIR=$(CURDIR)
STACK_DIR=/var/www/$(SERVERNAME)/vendor/nrwtaylor/stack-agent-thing/agents
.PHONY: help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
all: publish check ## Do everything, in order
publish: ## Save file to active stackj
cp -v $(WORK_DIR)/$(ACTIVE) $(STACK_DIR)/$(ACTIVE)
check: $(STACK_DIR)/$(ACTIVE) ## Check contents in active stack
diff $(WORK_DIR)/$(ACTIVE) $(STACK_DIR)/$(ACTIVE); exit 0
test: ## Test agent
cd /var/www/$(SERVERNAME); ./agent $(ACTIVE)
clean: ## Remove agent from stack
rm -vf $(STACK_DIR)/$(ACTIVE)