mirror of
https://github.com/planetmint/planetmint.git
synced 2025-06-06 06:06:42 +00:00
make clean now utilizes docker
This commit is contained in:
parent
8b07d05c60
commit
5924633bc9
22
Makefile
22
Makefile
@ -102,7 +102,8 @@ doc-acceptance: check-deps ## Create documentation for acceptance tests
|
||||
@$(DC) run --rm python-acceptance pycco -i -s /src -d /docs
|
||||
$(BROWSER) acceptance/python/docs/index.html
|
||||
|
||||
clean: clean-build clean-pyc clean-test ## Remove all build, test, coverage and Python artifacts
|
||||
clean: check-deps ## Remove all build, test, coverage and Python artifacts
|
||||
@$(DC) up clean
|
||||
@$(ECHO) "Cleaning was successful."
|
||||
|
||||
reset: check-deps ## Stop and REMOVE all containers. WARNING: you will LOSE all data stored in Planetmint.
|
||||
@ -129,22 +130,3 @@ ifndef IS_DOCKER_COMPOSE_INSTALLED
|
||||
@$(ECHO)
|
||||
@$(DC) # docker-compose is not installed, so we call it to generate an error and exit
|
||||
endif
|
||||
|
||||
clean-build: # Remove build artifacts
|
||||
@rm -fr build/
|
||||
@rm -fr dist/
|
||||
@rm -fr .eggs/
|
||||
@find . -name '*.egg-info' -exec rm -fr {} +
|
||||
@find . -name '*.egg' -exec rm -f {} +
|
||||
|
||||
clean-pyc: # Remove Python file artifacts
|
||||
@find . -name '*.pyc' -exec rm -f {} +
|
||||
@find . -name '*.pyo' -exec rm -f {} +
|
||||
@find . -name '*~' -exec rm -f {} +
|
||||
@find . -name '__pycache__' -exec rm -fr {} +
|
||||
|
||||
clean-test: # Remove test and coverage artifacts
|
||||
@find . -name '.pytest_cache' -exec rm -fr {} +
|
||||
@rm -fr .tox/
|
||||
@rm -f .coverage
|
||||
@rm -fr htmlcov/
|
||||
|
@ -123,4 +123,10 @@ services:
|
||||
- ./planetmint:/planetmint
|
||||
- ./acceptance:/acceptance
|
||||
- ./integration:/integration
|
||||
- ./tests:/tests
|
||||
- ./tests:/tests
|
||||
|
||||
clean:
|
||||
image: alpine
|
||||
command: /bin/sh -c "./planetmint/scripts/clean.sh"
|
||||
volumes:
|
||||
- $PWD:/planetmint
|
26
scripts/clean.sh
Executable file
26
scripts/clean.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# Copyright © 2020 Interplanetary Database Association e.V.,
|
||||
# Planetmint and IPDB software contributors.
|
||||
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||
|
||||
cd planetmint
|
||||
|
||||
# Remove build artifacts
|
||||
rm -fr build/
|
||||
rm -fr dist/
|
||||
rm -fr .eggs/
|
||||
find . -name '*.egg-info' -exec rm -fr {} +
|
||||
find . -name '*.egg' -type f -exec rm -f {} +
|
||||
|
||||
# Remove Python file artifacts
|
||||
find . -name '*.pyc' -exec rm -f {} +
|
||||
find . -name '*.pyo' -exec rm -f {} +
|
||||
find . -name '*~' -exec rm -f {} +
|
||||
find . -name '__pycache__' -exec rm -fr {} +
|
||||
|
||||
# Remove test and coverage artifacts
|
||||
find . -name '.pytest_cache' -exec rm -fr {} +
|
||||
rm -fr .tox/
|
||||
rm -f .coverage
|
||||
rm -fr htmlcov/
|
Loading…
x
Reference in New Issue
Block a user