diff --git a/ueforth/Makefile b/ueforth/Makefile index 7077279..c0b6a33 100644 --- a/ueforth/Makefile +++ b/ueforth/Makefile @@ -352,7 +352,7 @@ publish-windows: $(WINDOWS)/uEf32.exe $(WINDOWS)/uEf64.exe $(ARCHIVE)/uEf64-$(VERSION).exe publish-index: | $(GEN) - $(GSUTIL) ls gs://eforth/releases | tools/webindex.py >$(GEN)/archive.html + $(GSUTIL) ls -l gs://eforth/releases | tools/webindex.py >$(GEN)/archive.html $(GSUTIL_CP) \ $(GEN)/archive.html \ gs://eforth/releases/archive.html diff --git a/ueforth/tools/webindex.py b/ueforth/tools/webindex.py index b026692..09de2cb 100644 --- a/ueforth/tools/webindex.py +++ b/ueforth/tools/webindex.py @@ -23,9 +23,19 @@ sys.stdout.write("""

Release Archive

""") +output = [] for line in sys.stdin.read().splitlines(): - url = line.replace('gs://eforth/', 'https://eforth.storage.googleapis.com/') - name = line.replace('gs://eforth/releases/', '') + parts = line.split() + if len(parts) != 3: + continue + modes, date, path = parts + url = path.replace('gs://eforth/', 'https://eforth.storage.googleapis.com/') + name = path.replace('gs://eforth/releases/', '') if name == 'archive.html': continue - sys.stdout.write('%s
\n' % (name, url)) + output.append('%s %s
\n' % (date, name, url)) + +output.sort() +output.reverse() +for line in output: + sys.stdout.write(line)