forked from connamara/quickfixn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Downloads page now lists previous versions and includes a link to git…
…hub tags page
- Loading branch information
Richard Young
committed
Nov 16, 2011
1 parent
f22fad7
commit fe768b5
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Download | ||
======== | ||
|
||
The latest version of QuickFIX/n is {{latest_version}} | ||
|
||
You can download it [here] (http://quickfixn.s3.amazonaws.com/quickfixn-{{latest_version}}.zip) | ||
|
||
Previous Versions | ||
----------------- | ||
{{#previous_versions}} | ||
* [{{.}}] (http://quickfixn.s3.amazonaws.com/quickfixn-{{.}}.zip) | ||
{{/previous_versions}} | ||
|
||
[View all previous versions in github][0] | ||
|
||
[0]: https://github.com/connamara/quickfixn/tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
require 'rubygems' | ||
require 'mustache' | ||
|
||
if ARGV[0].nil? or ARGV[1].nil? | ||
puts "Usage: ruby update_downloads_page.rb <PATH_TO_DOWNLOADS_PAGE> <VERSION_NO>" | ||
exit 1 | ||
end | ||
|
||
page = File.join(Dir.pwd, ARGV[0]) | ||
ver = ARGV[1] | ||
Mustache.template_file = File.join(File.dirname(__FILE__), 'downloads.mustache') | ||
view = Mustache.new | ||
view[:latest_version] = ARGV[1] | ||
view[:previous_versions] = prev_versions = `git tag -l`.split("\n") | ||
|
||
File.open(page, 'w') do |f| | ||
f.puts "Download\n========\n\nThe latest version of QuickFIX/n is #{ver}\n\nYou can download it [here] (http://quickfixn.s3.amazonaws.com/quickfixn-#{ver}.zip)" | ||
File.open(File.join(Dir.pwd, ARGV[0]), 'w') do |f| | ||
f.puts view.render | ||
end |