Merge ~suligap/snapstore-client:various-Makefile-fixes into snapstore-client:master

Proposed by Przemysław Suliga
Status: Merged
Approved by: Przemysław Suliga
Approved revision: 9e9610cf4009dc1e5a54b84b1d174bb6dadd4fc4
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~suligap/snapstore-client:various-Makefile-fixes
Merge into: snapstore-client:master
Diff against target: 77 lines (+16/-9)
1 file modified
Makefile (+16/-9)
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Review via email: mp+415318@code.launchpad.net

Commit message

Various Makefile fixes/changes

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index 1282e78..f004ab5 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -9,6 +9,8 @@ DEPENDENCY_REPO ?= lp:~ubuntuone-pqm-team/ols-goodyear/+git/wheels
6 OLS_WHEELS_DIR_TMP = $(CURDIR)/ols-wheels
7 OLS_WHEELS_DIR ?= $(OLS_WHEELS_DIR_TMP)
8
9+SNAPCRAFT_FLAGS ?= --use-lxd
10+
11
12 $(OLS_WHEELS_DIR):
13 git clone $(DEPENDENCY_REPO) $(OLS_WHEELS_DIR)
14@@ -19,49 +21,54 @@ $(ENV)/prod: | $(OLS_WHEELS_DIR)
15 touch $@
16
17 $(ENV)/dev: $(ENV)/prod
18- $(PIP) install -f $(OLS_WHEELS_DIR) -r requirements-dev.txt
19+ $(PIP) install -f $(OLS_WHEELS_DIR) --no-index -r requirements-dev.txt
20 @touch $@
21
22+.PHONY: bootstrap
23 bootstrap: $(ENV)/prod
24
25+.PHONY: snap
26 snap:
27- snapcraft
28+ snapcraft $(SNAPCRAFT_FLAGS)
29
30+.PHONY: test
31 test: $(ENV)/dev
32- $(PYTHON3) -m pytest
33+ $(PYTHON3) -m pytest $(ARGS)
34 $(MAKE) --silent lint
35
36-
37 /snap/bin/documentation-builder:
38 sudo snap install documentation-builder
39
40+.PHONY: docs
41 docs: /snap/bin/documentation-builder
42 documentation-builder --base-dir docs --output-path docs/build
43
44-
45+.PHONY: lint
46 lint: $(ENV)/dev
47 $(FLAKE8) $(SERVICE_PACKAGE) conftest.py
48 $(BLACK) --check .
49
50+.PHONY: black
51 black: $(ENV)/dev
52 $(BLACK) .
53
54+.PHONY: coverage
55 coverage: $(ENV)/dev
56 $(PYTHON3) -m coverage erase
57 $(PYTHON3) -m coverage run --include "$(SERVICE_PACKAGE)*" -m pytest
58 $(PYTHON3) -m coverage html
59 $(PYTHON3) -m coverage report
60
61+.PHONY: clean
62 clean:
63 rm -rf $(TMPDIR)
64+ rm -rf $(ENV)
65 rm -rf $(OLS_WHEELS_DIR_TMP)
66 rm -rf dist docs/build
67 rm -rf .coverage htmlcov
68 find -name '__pycache__' -print0 | xargs -0 rm -rf
69 find -name '*.~*' -delete
70- snapcraft clean
71-
72-
73-.PHONY: bootstrap test lint coverage clean snap docs
74+ find -name snap-store-proxy-client*.snap -delete
75+ snapcraft clean $(SNAPCRAFT_FLAGS)
76
77 include Makefile.pipcompile

Subscribers

People subscribed via source and target branches

to all changes: