diff options
author | Brian Evans <grknight@gentoo.org> | 2017-12-12 15:15:41 -0500 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2017-12-12 15:15:41 -0500 |
commit | 70133c751e5ba45cd16a12b634b62b79b27cc4a9 (patch) | |
tree | 9dc4f22aa2d841983db29e4e92d591adc7a4bda1 /_plugins | |
parent | glep.css: Format admonitions (diff) | |
download | www-70133c751e5ba45cd16a12b634b62b79b27cc4a9.tar.gz www-70133c751e5ba45cd16a12b634b62b79b27cc4a9.tar.bz2 www-70133c751e5ba45cd16a12b634b62b79b27cc4a9.zip |
_plugins/download.rb: Add regex for new timestamp format of stage3
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to '_plugins')
-rw-r--r-- | _plugins/downloads.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/_plugins/downloads.rb b/_plugins/downloads.rb index da4596e..8222280 100644 --- a/_plugins/downloads.rb +++ b/_plugins/downloads.rb @@ -30,7 +30,18 @@ module Gentoo File.readlines(raw_arch + '/stage3.txt').each do |line| next if line.start_with? '#' - if line =~ /^(\d{8})\/(\w+\/)?stage3-(.*)-\d{8}.tar.(\S+) (\d+)$/ + if line =~ /^(\d{8}T\d{6}Z)\/(\w+\/)?stage3-(.*)-\d{8}T\d{6}Z.tar.(\S+) (\d+)$/ + date = Date.iso8601($1) + + site.data['downloads'][arch]['stage3'] ||= {} + site.data['downloads'][arch]['stage3'][$3] = { + 'name' => $3, + 'date' => date, + 'filename' => '%s/%sstage3-%s-%s.tar.%s' % [$1, $2, $3, $1, $4], + 'subdir' => $2, + 'size' => $5 + } + elsif line =~ /^(\d{8})\/(\w+\/)?stage3-(.*)-\d{8}.tar.(\S+) (\d+)$/ date = Date.parse('%s-%s-%s' % [$1[0..3], $1[4..5], $1[6..7]]) site.data['downloads'][arch]['stage3'] ||= {} |