diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 5b12c79..52a99f3 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -37,7 +37,7 @@ pipeline { } stage('Unit Test') { steps { - sh 'poetry run manage.py test' + sh 'poetry run manage.py test -v 2' } } /* At this moment, the Build Server cannot execute browsers @@ -67,4 +67,4 @@ pipeline { } } -} \ No newline at end of file +} diff --git a/.idea/misc.xml b/.idea/misc.xml index 8095892..26eba4b 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/.idea/platform.iml b/.idea/platform.iml index 639440c..dbd8ee7 100644 --- a/.idea/platform.iml +++ b/.idea/platform.iml @@ -14,7 +14,7 @@ - + diff --git a/deploy/deploy-uberspace.sh b/deploy/deploy-uberspace.sh new file mode 100755 index 0000000..e0a89f5 --- /dev/null +++ b/deploy/deploy-uberspace.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +DEPLOY_DIR=$(dirname -- "$( readlink -f -- \"$0\"; )"); +BASE_DIR=$(readlink -f -- "$DEPLOY_DIR/..") + +# Submodules Update +cd "$BASE_DIR" || exit 1 +git submodule update + +# 3rd Party Update +cd "$BASE_DIR/3rdparty" || exit 1 +yarn install + +# Poetry dependency Update +cd "$BASE_DIR" || exit 1 +poetry install --without dev --sync + +# Documentation build +cd "$BASE_DIR/documentation" || exit 1 +poetry run mkdocs build + +# Database update +cd "$BASE_DIR" || exit 1 +poetry run manage.py migrate --no-input + +# Static Files Update +cd "$BASE_DIR" || exit 1 +poetry run manage.py collectstatic --no-input + +# Instance Restart +supervisorctl restart solawi_suite diff --git a/pyproject.toml b/pyproject.toml index 63e40e3..80217a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [tool.poetry] name = "platform" -version = "0.5.1-dev" +version = "0.5.2-dev" description = "Plattform für die Apps der Solawi." authors = ["Juergen Edelbluth "] -license = "MIT" +license = "Apache License 2.0" readme = "README.md" packages = [ { include = "solawi_platform", from = ".", format = ["sdist", "wheel"] }, diff --git a/solawi_apps/changelog/migrations/0019_changelog_append.json b/solawi_apps/changelog/migrations/0019_changelog_append.json new file mode 100644 index 0000000..4f39d90 --- /dev/null +++ b/solawi_apps/changelog/migrations/0019_changelog_append.json @@ -0,0 +1 @@ +{"versions":[{"version_identifier":"0.5.2-dev","release_date":"2024-04-14T00:00:00+02:00","note":null,"version_name":"Bugfixes und weitere Automatisierung","items":[{"is_breaking_change":false,"requires_db_update":false,"title":"Meta-Description zu lang","note":"Die Meta-Description war einige Zeichen zu lang und ist jetzt auf 155 Zeichen gekürzt.","item_type":"bugfix","tickets":[]},{"is_breaking_change":false,"requires_db_update":false,"title":"Deployment-Skripte","note":"Nach dem automatischen Bauen und Testen geht es nun weiter mit dem automatischen Deployen.","item_type":"enhancement","tickets":[]}]}]} \ No newline at end of file diff --git a/solawi_apps/changelog/migrations/0019_changelog_append.py b/solawi_apps/changelog/migrations/0019_changelog_append.py new file mode 100644 index 0000000..4960e45 --- /dev/null +++ b/solawi_apps/changelog/migrations/0019_changelog_append.py @@ -0,0 +1,54 @@ +from os.path import dirname, join +from json import loads + +from django.db import migrations + +from solawi_apps.changelog.object_model import ChangelogDataMigration + + +DATA_FILE = join(dirname(__file__), '0019_changelog_append.json') + + +def append_changelog(apps, schema_editor): + Version = apps.get_model("changelog", "Version") + Item = apps.get_model("changelog", "Item") + Ticket = apps.get_model("changelog", "Ticket") + with open(DATA_FILE, "rt", encoding="utf-8") as fd: + json_data = fd.read() + todo = ChangelogDataMigration(**loads(json_data)) + for v in todo.versions: + version = Version.objects.create( + version_identifier=v.version_identifier, + release_datetime=v.release_date, + note_md=v.note, + version_name=v.version_name, + enabled=True, + ) + for i in v.items: + item = Item.objects.create( + version_fk=version, + enhancement_type=i.item_type, + requires_db_update=i.requires_db_update, + is_breaking_change=i.is_breaking_change, + title=i.title, + note_md=i.note, + enabled=True, + ) + for t in i.tickets: + Ticket.objects.create( + item_fk=item, + ticket=t.ticket_id, + ticket_url=t.ticket_url, + enabled=True, + ) + + +class Migration(migrations.Migration): + + dependencies = [ + ('changelog', '0018_changelog_append'), + ] + + operations = [ + migrations.RunPython(append_changelog), + ] diff --git a/solawi_apps/ui/templates/solawi_apps/ui/base/_metatags.html b/solawi_apps/ui/templates/solawi_apps/ui/base/_metatags.html index 51785c2..8647dc3 100644 --- a/solawi_apps/ui/templates/solawi_apps/ui/base/_metatags.html +++ b/solawi_apps/ui/templates/solawi_apps/ui/base/_metatags.html @@ -1,6 +1,6 @@ {% load i18n %}{% load i18n %}{% get_current_language as LANGUAGE_CODE %}{% now "Y" as current_year %}{% spaceless %} - +