forked from bioboxes/file-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (45 loc) · 1.41 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
env = PYTHONPATH=validate_input:vendor/python/lib/python2.7/site-packages PATH=vendor/python/bin:$$PATH
pwd = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
distributable = dist/validate-input-$(shell cat VERSION).tar.xz
###############################################
#
# Workflow steps
#
###############################################
deploy: $(distributable)
bundle exec ./plumbing/push-to-s3 $<
bundle exec ./plumbing/rebuild-website
build: build/validate-input
BINARY='$(realpath $<)' \
bundle exec cucumber
feature: Gemfile.lock
BINARY='$(pwd)/vendor/python/bin/python $(pwd)/bin/validate-input' \
bundle exec cucumber
test:
$(env) nosetests --rednose
console:
$(env) python -i console.py
bootstrap: Gemfile.lock vendor/python
.PHONY: bootstrap console test feature build deploy
###############################################
#
# Specific targets
#
###############################################
$(distributable): build/validate-input
mkdir -p $(dir $@)
tar -c -J -f $@ $(dir $^)
build/validate-input: bin/validate-input $(shell find validate_input/*.py)
$(env) nuitka --remove-output --standalone $<
rm -rf $(dir $@)
mv $(notdir $<).dist/ $(dir $@)
mv [email protected] $@
cp doc/validate-input.mkd $(dir $@)/README.mkd
vendor/python: requirements.txt
virtualenv $@
$@/bin/pip install -r $<
touch $@
Gemfile.lock: Gemfile
bundle install --path vendor/ruby
clean:
rm -rf build