-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
47 lines (33 loc) · 1.78 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
.PHONY: all test clean-test-output
.SILENT: clean-test-output
all: test
test: clean-test-output
python3 -m doctest ./facturedata/core.py
./facturedata/__main__.py --conf-dir="tests/examples/json_output" --skip-targets --output-type=json > test_output/json_output/output.json
diff tests/examples/json_output/expected_output.json test_output/json_output/output.json && echo OK
cp tests/examples/sql_inject_target/original.sql test_output/sql_inject_target/result.sql
./facturedata/__main__.py --conf-dir="tests/examples/sql_inject_target" --skip-targets --output-type=json > test_output/sql_inject_target/debug_intermediate.json
./facturedata/__main__.py --conf-dir="tests/examples/sql_inject_target"
diff tests/examples/sql_inject_target/expected_result.sql test_output/sql_inject_target/result.sql && echo OK
cp tests/examples/advanced_functionality/original.sql test_output/sql_inject_target/result.sql
./facturedata/__main__.py --conf-dir="tests/examples/advanced_functionality" --skip-targets --output-type=json > test_output/sql_inject_target/debug_intermediate.json
./facturedata/__main__.py --conf-dir="tests/examples/advanced_functionality"
diff tests/examples/advanced_functionality/expected_result.sql test_output/sql_inject_target/result.sql && echo OK
clean-test-output:
rm -rf test_output
mkdir -p test_output/json_output
mkdir -p test_output/sql_inject_target
release: clean-releases
python3 setup.py sdist
clean-releases:
rm -rf dist
publish-test:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
install-test:
pip3 install --index-url https://test.pypi.org/simple/ facturedata
publish:
twine upload dist/*
tag:
git tag v`grep -o "version.*" setup.py | egrep -o "[0-9.]+"`
tag-push:
git push origin v`grep -o "version.*" setup.py | egrep -o "[0-9.]+"`