Compare commits

..

No commits in common. "8a0baeb596ca614111efaf261df454e2ea5544ca" and "583126b0c0d4f46c2683ca16798b8bb98be16539" have entirely different histories.

4 changed files with 2 additions and 36 deletions

1
.gitignore vendored
View File

@ -29,4 +29,3 @@ config/__pycache__
# Template generated files:
src/docker-compose.yml
src/clean-data.sh

View File

@ -25,4 +25,3 @@ def template(filename, target_path):
# Render the templates:
## Create Docker-Compose
template("docker-compose.yml.j2", "./src/")
template("clean-data.sh.j2", "./src/")

View File

@ -20,9 +20,7 @@ start: db-start api-start ui-start
stop: ui-stop api-stop db-stop
# Clean everything
clean:
chmod +x ./src/clean-data.sh
./src/clean-data.sh
clean: ui-clean api-clean db-clean
# Setup Database
db-init: config

View File

@ -1,30 +0,0 @@
#!/bin/bash
# Variables
## Static
CLEAN_ERROR_ID=0
# Pre Tasks
## Stop Project
make stop
# Clean Tasks
echo "Executing Clean tasks"
## Remove Generated docker-compose
rm -rf src/docker-compose.yml || CLEAN_ERROR_ID=1
## Clean DB-Data
rm -rf {% if db.data_path_mysql is defined %}{{ data_path_mysql }}{% else %}./src/db/cache/mysql_data{% endif %} || CLEAN_ERROR_ID=3
rm -rf {% if db.data_path_mysql_backup is defined %}{{ data_path_mysql_backup }}{% else %}./src/db/cache/mysql_backup{% endif %} || CLEAN_ERROR_ID=4
# Post Task
## Remove Clean script itself
rm -rf src/clean-data.sh || CLEAN_ERROR_ID=2
## Output
if [ $CLEAN_ERROR_ID -eq 0 ]
then
echo "Cleaning Tasks were Successfull"
else
echo "There where some Issues while cleaning, check ID: $CLEAN_ERROR_ID"
fi