Skip to content

Commit

Permalink
refactor(Makefile): Cleanup variables (#1367)
Browse files Browse the repository at this point in the history
* refactor(Makefile): Cleanup variables

Signed-off-by: provokateurin <[email protected]>

* fixup: Adjust one missing variable (poetry_run)

Signed-off-by: Josh <[email protected]>

* returned "db" variable back

Signed-off-by: Alexander Piskun <[email protected]>

---------

Signed-off-by: provokateurin <[email protected]>
Signed-off-by: Josh <[email protected]>
Signed-off-by: Alexander Piskun <[email protected]>
Co-authored-by: Josh <[email protected]>
Co-authored-by: Alexander Piskun <[email protected]>
  • Loading branch information
3 people authored Jun 10, 2024
1 parent 9999f10 commit 8cab226
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
poetry=poetry
poetry_run=$(poetry) run
python=$(poetry_run) python
pyresttest=$(poetry_run) pyresttest
coverage=$(poetry_run) coverage
manage-script=$(CURDIR)/manage.py
manage=$(poetry_run) $(manage-script)
manage=poetry run $(manage-script)
db=sqlite
npm=npm
prod_version=27.0.0

.PHONY: test
test:
$(npm) test
$(coverage) run --source=nextcloudappstore $(manage-script) test --settings nextcloudappstore.settings.development -v 2
$(coverage) report --fail-under 90
npm test
poetry run coverage run --source=nextcloudappstore $(manage-script) test --settings nextcloudappstore.settings.development -v 2
poetry run coverage report --fail-under 90

.PHONY: resetup
resetup:
Expand All @@ -29,9 +22,9 @@ initmigrations:
.PHONY: dev-setup
dev-setup:
rm -f db.sqlite3
$(npm) install
$(npm) run build
$(poetry) install
npm install
npm run build
poetry install
cp $(CURDIR)/scripts/development/settings/base.py $(CURDIR)/nextcloudappstore/settings/development.py
cat $(CURDIR)/scripts/development/settings/$(db).py >> $(CURDIR)/nextcloudappstore/settings/development.py
$(MAKE) initdb
Expand All @@ -53,12 +46,12 @@ docs html:

.PHONY: update-dev-deps
update-dev-deps:
$(poetry) upgrade
$(npm) install --upgrade
poetry upgrade
npm install --upgrade

.PHONY: authors
authors:
$(python) $(CURDIR)/scripts/generate_authors.py
poetry run python $(CURDIR)/scripts/generate_authors.py

.PHONY: clean
clean:
Expand All @@ -69,11 +62,11 @@ clean:

.PHONY: test-data
test-data: test-user
PYTHONPATH="${PYTHONPATH}:$(CURDIR)/scripts/" $(python) -m development.testdata
PYTHONPATH="${PYTHONPATH}:$(CURDIR)/scripts/" poetry run python -m development.testdata

.PHONY: prod-data
prod-data:
PYTHONPATH="${PYTHONPATH}:$(CURDIR)/scripts/" $(python) -m development.proddata $(prod_version)
PYTHONPATH="${PYTHONPATH}:$(CURDIR)/scripts/" poetry run python -m development.proddata 27.0.0

.PHONY: l10n
l10n:
Expand All @@ -82,7 +75,7 @@ l10n:

.PHONY: coverage
coverage:
$(coverage) xml
poetry run coverage xml

.PHONY: test-user
test-user:
Expand Down

0 comments on commit 8cab226

Please sign in to comment.