- Bugfix for metatags
- Deployment script
- Licenses match now

Reviewed-on: #47
Co-authored-by: Juergen Edelbluth <jed@noreply.git.codebau.dev>
Co-committed-by: Juergen Edelbluth <jed@noreply.git.codebau.dev>
This commit is contained in:
Jürgen Edelbluth 2024-04-14 09:03:35 +02:00 committed by Jürgen Edelbluth
parent 183cf74253
commit 9356f23808
Signed by: git.codebau.dev
GPG Key ID: F798C6B4352E8035
8 changed files with 93 additions and 7 deletions

4
.ci/Jenkinsfile vendored
View File

@ -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 {
}
}
}
}

View File

@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="Poetry (platform)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Poetry (platform) (2)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Poetry (platform)" project-jdk-type="Python SDK" />
</project>

View File

@ -14,7 +14,7 @@
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Poetry (platform) (2)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Poetry (platform)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TemplatesService">

31
deploy/deploy-uberspace.sh Executable file
View File

@ -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

View File

@ -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 <solawi@jued.de>"]
license = "MIT"
license = "Apache License 2.0"
readme = "README.md"
packages = [
{ include = "solawi_platform", from = ".", format = ["sdist", "wheel"] },

View File

@ -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":[]}]}]}

View File

@ -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),
]

View File

@ -1,6 +1,6 @@
{% load i18n %}{% load i18n %}{% get_current_language as LANGUAGE_CODE %}{% now "Y" as current_year %}{% spaceless %}
<meta name="robots" content="INDEX,FOLLOW">
<meta name="description" content="{% blocktranslate %}Die [solawi-suite] ist ein Werkzeugkasten zur Digitalisierung von Aufgaben innerhalb einer Solidarischen Landwirtschaft (SoLaWi). Hier gibt es Lösung beispielsweise für die digitale Gebotsabgabe.{% endblocktranslate %}">
<meta name="description" content="{% blocktranslate %}Ein Werkzeugkasten zur Digitalisierung von Aufgaben einer Solidarischen Landwirtschaft (SoLaWi). Hier gibt es Lösungen z. B. für die digitale Gebotsabgabe.{% endblocktranslate %}">
<meta name="keywords" content="{% blocktranslate %}SoLaWi, Digitalisierung, Gebotsabgabe, Bieterrunde, Gebot, Digitales Gebot, Open Source, Gebotsrunde, Finanz-AK, Orga-AK, Mitglieder, Abholgemeinschaft, AHK, Beamer-Steuerung, Jahreshauptversammlung, Gründung{% endblocktranslate %}">
<meta name="author" content="{% translate "Jürgen Edelbluth, solawi.me" %}">
<meta name="publisher" content="{% translate "Jürgen Edelbluth, solawi.me" %}">