Set latest download version automatically based on release notes

This commit is contained in:
Saivann 2013-09-04 13:29:36 -04:00
parent 264321ed22
commit bcebe9c481
3 changed files with 6 additions and 5 deletions

View file

@ -12,7 +12,6 @@ Installing dependencies on older Ubuntu and Debian distributions
# Usage # Usage
* update DOWNLOAD\_VERSION in _config.yml
* run jekyll * run jekyll
* output will be in \_site/ * output will be in \_site/
@ -102,7 +101,7 @@ More information will follow.
### Release Notes ### Release Notes
Release notes should be placed in `_releases/YYYY-MM-DD-SHORTTITLE.md` and adhere to this format: Release notes should be placed in `_releases/YYYY-MM-DD-VERSION.md` and adhere to this format:
``` ```
--- ---
@ -115,7 +114,7 @@ Bitcoin v0.3.24 is now available for download at
... ...
``` ```
* `SHORTTITLE` is used to construct the URL. Something like `v0.3.24` will be fine * `VERSION` is used to define the version and construct the URL. It should adhere to this format: `v0.3.24`.
* `title: ...` will be used as the title * `title: ...` will be used as the title
* `src: ...` (optional) link to full annoucement * `src: ...` (optional) link to full annoucement

View file

@ -1,5 +1,3 @@
DOWNLOAD_VERSION: 0.8.4
langsorder: langsorder:
- id: de - id: de
- id: id - id: id

View file

@ -17,6 +17,10 @@ module Jekyll
self.data['redirect'] = dst.gsub('.md','') self.data['redirect'] = dst.gsub('.md','')
else else
self.data['category'] = 'release' self.data['category'] = 'release'
if !site.config.has_key?('DOWNLOAD_DATE') or site.config['DOWNLOAD_DATE'] < year + '-' + month + '-' + day
site.config['DOWNLOAD_DATE'] = year + '-' + month + '-' + day
site.config['DOWNLOAD_VERSION'] = dst.gsub('.md','').gsub(/[a-z]/,'')
end
site.pages << ReleasePage.new(site, base, lang, srcdir, src, '/releases/' + year + '/' + month + '/' + day, dst, year, month, day) site.pages << ReleasePage.new(site, base, lang, srcdir, src, '/releases/' + year + '/' + month + '/' + day, dst, year, month, day)
end end
end end