Skip to content
Snippets Groups Projects
dev.sh 1.4 KiB
Newer Older
remove_pip_metadata() {
    find . -type d -name pip-wheel-metadata -print0 | xargs -0r rm -rf --
}

case "$1" in
    "install-all")
	cd "$(dirname "$0")"
	poetry install
	for d in apps/official/*; do
	    poetry run sh -c "cd $d; poetry lock; poetry install"
	poetry run ./manage.py compilemessages
	poetry run ./manage.py yarn install
	poetry run ./manage.py collectstatic --no-input
    "makemessages")
	cd "$(dirname "$0")"
	manage_py=$(realpath manage.py)
	locales="-l ar -l de_DE -l fr -l nb_NO -l tr_TR"
	for d in aleksis/core apps/official/*/aleksis/apps/*; do
		echo; echo "Entering $d."
		poetry run sh -c "cd $d; $manage_py makemessages --no-wrap -i static $locales"
	done
	;;
    "autopep8")
	cd "$(dirname "$0")"
	for d in aleksis/core apps/official/*/aleksis/apps/*; do
		echo; echo "Entering $d."
		poetry run sh -c "cd $d; autopep8 -i -r ."
	done
	;;
	cd "$(dirname "$0")"
	tox_ini=$(realpath tox.ini)
	for d in aleksis/core apps/official/*/aleksis/apps/*; do
		echo; echo "Entering $d."
		poetry run sh -c "cd $d; pylama -a -o $tox_ini ."
	done
	;;
	for d in aleksis/core apps/official/*/aleksis/apps/*; do
		gource --output-custom-log - "$d"
	done | sort -n | gource --log-format custom --background-image aleksis/core/static/img/aleksis-logo.png -