Add date to index.
This commit is contained in:
@ -352,7 +352,7 @@ publish-windows: $(WINDOWS)/uEf32.exe $(WINDOWS)/uEf64.exe
|
|||||||
$(ARCHIVE)/uEf64-$(VERSION).exe
|
$(ARCHIVE)/uEf64-$(VERSION).exe
|
||||||
|
|
||||||
publish-index: | $(GEN)
|
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) \
|
$(GSUTIL_CP) \
|
||||||
$(GEN)/archive.html \
|
$(GEN)/archive.html \
|
||||||
gs://eforth/releases/archive.html
|
gs://eforth/releases/archive.html
|
||||||
|
|||||||
@ -23,9 +23,19 @@ sys.stdout.write("""<!DOCTYPE html>
|
|||||||
<h1>Release Archive</h1>
|
<h1>Release Archive</h1>
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
output = []
|
||||||
for line in sys.stdin.read().splitlines():
|
for line in sys.stdin.read().splitlines():
|
||||||
url = line.replace('gs://eforth/', 'https://eforth.storage.googleapis.com/')
|
parts = line.split()
|
||||||
name = line.replace('gs://eforth/releases/', '')
|
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':
|
if name == 'archive.html':
|
||||||
continue
|
continue
|
||||||
sys.stdout.write('<a href="%s">%s</a><br/>\n' % (name, url))
|
output.append('%s <a href="%s">%s</a><br/>\n' % (date, name, url))
|
||||||
|
|
||||||
|
output.sort()
|
||||||
|
output.reverse()
|
||||||
|
for line in output:
|
||||||
|
sys.stdout.write(line)
|
||||||
|
|||||||
Reference in New Issue
Block a user