-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
executable file
·38 lines (30 loc) · 914 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
26
27
28
29
30
31
32
33
34
35
36
37
38
SHELL := /bin/bash
GIT_SHA = $(shell git log --pretty=oneline | head -n1 | cut -c1-8)
PACKAGE = "salt_config-$(GIT_SHA).tgz"
SHASUM = $(shell test `uname` == 'Darwin' && echo shasum -a 256 || echo sha256sum)
all: formulas
@mkdir -p dist
@rsync -a ./salt/ ./dist/salt/ --delete
@rsync -a ./formulas/ ./dist/formulas/ --delete
@rsync -a ./pillar/ ./dist/pillar/ --delete
@echo $(GIT_SHA) > ./dist/SHA
@find ./dist -type f | sort | xargs $(SHASUM) | sed "s;./dist;/srv;" > MANIFEST
@$(SHASUM) MANIFEST | cut -d\ -f1 > MANIFEST.sha256
@mv MANIFEST* ./dist/
@echo "Salt is ready in ./dist. Enjoy!"
lint:
@tests/lint.sh
docker:
@tests/docker.sh
test: clean all lint
@true
package: clean all
@tar czf $(PACKAGE) ./dist/
@mv -f $(PACKAGE) ./dist
@echo "Package ./dist/$(PACKAGE) is ready."
clean::
@echo -n "Removing ./dist directory..."
@rm -rf dist
@echo "DONE"
coverage:
@tests/coverage.sh