From ec0daf604a366b18c842a13e1821391a5e2abdcd Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Thu, 15 Jul 2021 12:29:01 +0100 Subject: [PATCH] Add latest.txt as per new format discussed in #7336 Remove make-latest.sh, since there's now more information than we can sensibly construct from the command line - the file should now be uploaded to releases.wagtail.io with `./latest.sh put latest.txt`. --- scripts/latest.txt | 10 ++++++++++ scripts/make-latest.sh | 43 ------------------------------------------ 2 files changed, 10 insertions(+), 43 deletions(-) create mode 100644 scripts/latest.txt delete mode 100755 scripts/make-latest.sh diff --git a/scripts/latest.txt b/scripts/latest.txt new file mode 100644 index 0000000000..6bddf2d734 --- /dev/null +++ b/scripts/latest.txt @@ -0,0 +1,10 @@ +{ + "version": "2.13.4", + "url": "https://docs.wagtail.io/en/stable/releases/2.13.4.html", + "majorUrl": "https://docs.wagtail.io/en/stable/releases/2.13.html", + "lts": { + "version": "2.11.8", + "url": "https://docs.wagtail.io/en/stable/releases/2.11.8.html", + "majorUrl": "https://docs.wagtail.io/en/stable/releases/2.11.html" + } +} diff --git a/scripts/make-latest.sh b/scripts/make-latest.sh deleted file mode 100755 index 4a1a59c7d2..0000000000 --- a/scripts/make-latest.sh +++ /dev/null @@ -1,43 +0,0 @@ -#! /bin/sh -# vim:sw=4 ts=4 et: - -version="" -url="https://wagtail.io" - -while [ ! -z "$1" ]; do - case "$1" in - --version=*) - version=$(echo "$1" | sed -e 's/^--version=//') - ;; - --url=*) - url=$(echo "$1" | sed -e 's/^--url=//') - ;; - *) - printf >&2 -- '%s: unknown argument "%s"\n' "$0" - printf >&2 -- 'usage: %s --version= [--url=]\n' "$0" - exit 1 - esac - shift -done - -if [ -z "$version" ]; then - printf >&2 -- '%s: must specify --version\n' "$0" - printf >&2 -- 'usage: %s --version= [--url=]\n' "$0" - exit 1 -fi - -LTMP=$(mktemp "${TMPDIR:-/tmp}/latest.XXXXXX") -if [ "$?" -ne 0 ]; then - printf >&2 -- '%s: cannot create temporary file\n' "$0" - exit 1 -fi -trap 'rm -f "${LTMP}"' 0 TERM INT - -cat >"${LTMP}" <<__EOF__ -{ - "version": "${version}", - "url": "${url}" -} -__EOF__ - -${0%make-latest.sh}latest.sh put "${LTMP}"