mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-05-28 18:23:04 +03:00
Add a finish trap on exit for testing
This commit is contained in:
parent
8c23a55c22
commit
40381e2648
|
@ -5,6 +5,15 @@
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -x
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
finish() {
|
||||||
|
# Your cleanup code here
|
||||||
|
docker compose -f docker-compose.local.yml down
|
||||||
|
docker volume rm my_awesome_project_my_awesome_project_local_postgres_data
|
||||||
|
|
||||||
|
}
|
||||||
|
trap finish EXIT
|
||||||
|
|
||||||
# create a cache directory
|
# create a cache directory
|
||||||
mkdir -p .cache/docker
|
mkdir -p .cache/docker
|
||||||
|
@ -44,6 +53,7 @@ docker compose -f docker-compose.local.yml run \
|
||||||
# Generate the HTML for the documentation
|
# Generate the HTML for the documentation
|
||||||
docker compose -f docker-compose.docs.yml run docs make html
|
docker compose -f docker-compose.docs.yml run docs make html
|
||||||
|
|
||||||
|
docker build -f ./compose/production/django/Dockerfile .
|
||||||
# Run npm build script if package.json is present
|
# Run npm build script if package.json is present
|
||||||
if [ -f "package.json" ]
|
if [ -f "package.json" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user