Update footer in index.html to include version number and adjust footer styling in styles.css
This commit is contained in:
@@ -79,10 +79,25 @@ if git -C "$repo_root" show-ref --verify --quiet "refs/tags/$version"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build_context="$(mktemp -d)"
|
||||
trap 'rm -rf "$build_context"' EXIT
|
||||
git -C "$repo_root" archive HEAD | tar -x -C "$build_context"
|
||||
footer_file="$build_context/frontend/index.html"
|
||||
footer_count="$(grep -c '<footer>' "$footer_file" || true)"
|
||||
if [[ "$footer_count" -ne 1 ]]; then
|
||||
echo "Expected exactly one footer in frontend/index.html." >&2
|
||||
exit 1
|
||||
fi
|
||||
sed -E -i "/<footer>/ { s/ · v[0-9]+\.[0-9]+\.[0-9]+//; s#</p># · v$version</p>#; }" "$footer_file"
|
||||
if ! grep -Fq "· v$version</p></footer>" "$footer_file"; then
|
||||
echo "Could not update the footer version in the build context." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git -C "$repo_root" tag --annotate "$version" --message "Release $version" HEAD
|
||||
|
||||
cd "$repo_root"
|
||||
docker build --tag "$image:$version" --tag "$image:latest" .
|
||||
docker build --tag "$image:$version" --tag "$image:latest" "$build_context"
|
||||
registry_username="${GITEA_USERNAME:-${DOCKER_USERNAME:-}}"
|
||||
registry_token="${GITEA_TOKEN:-${DOCKER_PASSWORD:-}}"
|
||||
unset GITEA_TOKEN DOCKER_PASSWORD
|
||||
|
||||
Reference in New Issue
Block a user