Flatpak repository: always publish its HTTPS URL (#4864) (#4875)

GitHub Pages reports the base URL as http:// for the custom domain, so the
.flatpakrepo file, the remote-add line on the repository page and the mirror
of the previous repository all used plain HTTP. Force https:// once where the
base URL is read.
This commit is contained in:
raykholo
2026-10-26 06:49:50 +00:00
committed by GitHub
parent 3d0e2a8b3c
commit 2445c0f13d
+3
View File
@@ -35,6 +35,9 @@ repo_dir="$site/flatpak/repo"
mkdir -p "$repo_dir"
ostree --repo="$repo_dir" init --mode=archive-z2
base_url="${PAGES_BASE_URL%/}"
# Pages reports its base URL as http:// for a custom domain; the repository is always fetched over
# HTTPS (the remote URL is stored by every client that adds it).
base_url="https://${base_url#*://}"
previous_url="$base_url/flatpak/repo"
if curl --fail --silent --location --output /dev/null "$previous_url/summary"; then
ostree --repo="$repo_dir" remote add --no-gpg-verify previous "$previous_url"