Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/scripts/generate-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,29 @@ MAINTAINER_EMAIL="${MAINTAINER_EMAIL:-matti.airas@hatlabs.fi}"
# Date in RFC 2822 format
DATE=$(date -R)

# Get recent changes from git log
# Get commits since last published release tag
LAST_TAG=$(git tag -l "v*" --sort=-version:refname | grep -v "~pre" | head -n1 || echo "")

# Fold commit subjects into changelog bullets wrapped at 80 columns. lintian's
# debian-changelog-line-too-long warning is fatal in the release build
# (--fail-on warning), and conventional-commit subjects can exceed the limit
# once the " * " prefix is added.
wrap_changes() {
while IFS= read -r subject; do
[ -z "$subject" ] && continue
printf '%s\n' "$subject" \
| fold -s -w 76 \
| sed -e 's/[[:space:]]*$//' -e '1s/^/ * /' -e '1!s/^/ /'
done
}

# Get commits since last published (non-pre-release) tag.
LAST_TAG=$(git tag -l "v*" --sort=-version:refname | grep -v "_pre" | head -n1 || echo "")

# tformat (not format) terminates every subject with a newline so the read
# loop in wrap_changes does not drop the last commit.
if [ -n "$LAST_TAG" ]; then
CHANGES=$(git log "${LAST_TAG}"..HEAD --pretty=format:" * %s" --no-merges || echo " * Build ${REVISION}")
CHANGES=$(git log "${LAST_TAG}"..HEAD --pretty=tformat:"%s" --no-merges -- | wrap_changes)
else
# No previous tags, use recent commits
CHANGES=$(git log -10 --pretty=format:" * %s" --no-merges || echo " * Build ${REVISION}")
CHANGES=$(git log -10 --pretty=tformat:"%s" --no-merges | wrap_changes)
fi

# If no changes (shouldn't happen), use a default message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def _build_clean_compose(self, casaos_app: CasaOSApp) -> dict[str, Any]:
# Transform host path
transformed_host = self._transform_path(volume.host, casaos_app.id)

volume_def = {
volume_def: dict[str, Any] = {
"type": "bind",
"source": transformed_host,
"target": volume.container,
Expand Down
13 changes: 6 additions & 7 deletions src/generate_container_packages/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,23 @@ def generate_routing_yml(
if scheme != "http":
backend_config["scheme"] = scheme

auth_config: dict[str, Any] = {"mode": auth_mode}
# Add forward_auth headers if present
if forward_auth_headers:
auth_config["forward_auth"] = {"headers": forward_auth_headers}

routing_data: dict[str, Any] = {
"app_id": app_id,
"package_name": package_name,
"routing": {
"backend": backend_config,
},
"auth": {
"mode": auth_mode,
},
"auth": auth_config,
"network": {
"join_proxy_network": not is_host_network,
},
}

# Add forward_auth headers if present
if forward_auth_headers:
routing_data["auth"]["forward_auth"] = {"headers": forward_auth_headers}

# Generate YAML with header comment
header = f"""# Generic routing declaration for {app_id}
# Installed to /etc/halos/routing.d/{app_id}.yml
Expand Down
Loading