Permalink
Browse files

Re-jig the downloads.

  • Loading branch information...
1 parent 9ad5f45 commit 90561c5ab6b9af6eeac1c9bea7f9a065622b9bad @bobmcwhirter bobmcwhirter committed Apr 14, 2011
View
24 _config/old_releases.yml
@@ -0,0 +1,24 @@
+- version: 1.0.0.Beta23
+ jira_version: 12315484
+- version: 1.0.0.Beta22
+ jira_version: 12315357
+- version: 1.0.0.Beta21
+ jira_version: 12315149
+- version: 1.0.0.Beta20
+ jira_version: 12314643
+- version: 1.0.0.Beta19
+ jira_version: 12314180
+- version: 1.0.0.Beta18
+ jira_version: 12314133
+- version: 1.0.0.Beta17
+ jira_version: 12314013
+- version: 1.0.0.Beta16
+ jira_version: 12313992
+- version: 1.0.0.Beta15
+ jira_version: 12313980
+- version: 1.0.0.Beta14
+ jira_version: 12313681
+- version: 1.0.0.Beta13
+ jira_version: 12313639
+- version: 1.0.0.Beta12
+ jira_version: 12313637
View
26 _config/releases.yml
@@ -1,24 +1,2 @@
-- version: 1.0.0.Beta23
- jira_version: 12315484
-- version: 1.0.0.Beta22
- jira_version: 12315357
-- version: 1.0.0.Beta21
- jira_version: 12315149
-- version: 1.0.0.Beta20
- jira_version: 12314643
-- version: 1.0.0.Beta19
- jira_version: 12314180
-- version: 1.0.0.Beta18
- jira_version: 12314133
-- version: 1.0.0.Beta17
- jira_version: 12314013
-- version: 1.0.0.Beta16
- jira_version: 12313992
-- version: 1.0.0.Beta15
- jira_version: 12313980
-- version: 1.0.0.Beta14
- jira_version: 12313681
-- version: 1.0.0.Beta13
- jira_version: 12313639
-- version: 1.0.0.Beta12
- jira_version: 12313637
+- version: 1.0.0.CR1
+ jira_version: 12315805
View
23 _ext/downloads.rb
@@ -13,12 +13,12 @@ class Downloads
map(:development, 'Dev')
map(:alpha, 'Alpha')
map(:beta, 'Beta')
- map(:preview, 'Preview')
+ map(:release_candidate, 'CR')
end
end
end
- REPO_PREFIX = "http://repository.torquebox.org/maven2/releases/org/torquebox"
+ REPO_PREFIX = "http://repository-torquebox.cloudbees.com/release/org/torquebox"
DOCS_PREFIX = "#{REPO_PREFIX}/torquebox-docs-en_US"
def initialize(enabled=true)
@@ -30,20 +30,19 @@ def execute(site)
site.releases.each do |release|
v = Versionomy.parse( release.version, FORMAT )
- all_releases(release)
- if ( v.major == 1 && v.minor == 0 && v.beta_version < 21 )
- before_beta21(release)
- else
- after_beta21(release)
- end
- if ( v.major == 1 && v.minor == 0 && v.beta_version < 22 )
- before_beta22(release)
- else
- after_beta22(release)
+
+ case ( v )
+ when ( v('1.0.0.CR1')..('1.0.0') )
+ all_releases(release)
+ release.urls.dist_zip = "#{REPO_PREFIX}/torquebox-dist/#{release.version}/torquebox-dist-#{release.version}-bin.zip"
end
end
end
+ def v(version)
+ Versionomy.parse( version, FORMAT )
+ end
+
def all_releases(release)
release.urls ||= OpenStruct.new
release.urls.docs ||= OpenStruct.new
View
76 _ext/old_downloads.rb
@@ -0,0 +1,76 @@
+
+require 'rubygems'
+require 'versionomy'
+
+class OldDownloads
+
+
+ FORMAT = Versionomy.default_format.modified_copy do
+ field(:release_type, :requires_previous_field => false,
+ :default_style => :short) do
+ recognize_regexp_map(:style => :long, :default_delimiter => '',
+ :delimiter_regexp => '-|\.|\s?') do
+ map(:development, 'Dev')
+ map(:alpha, 'Alpha')
+ map(:beta, 'Beta')
+ map(:preview, 'Preview')
+ end
+ end
+ end
+
+ REPO_PREFIX = "http://repository.torquebox.org/maven2/releases/org/torquebox"
+ DOCS_PREFIX = "#{REPO_PREFIX}/torquebox-docs-en_US"
+
+ def initialize(enabled=true)
+ @enabled = enabled
+ end
+
+ def execute(site)
+ return unless @enabled
+
+ site.old_releases.each do |release|
+ v = Versionomy.parse( release.version, FORMAT )
+ all_releases(release)
+ if ( v.major == 1 && v.minor == 0 && v.beta_version < 21 )
+ before_beta21(release)
+ else
+ after_beta21(release)
+ end
+ if ( v.major == 1 && v.minor == 0 && v.beta_version < 22 )
+ before_beta22(release)
+ else
+ after_beta22(release)
+ end
+ end
+ end
+
+ def all_releases(release)
+ release.urls ||= OpenStruct.new
+ release.urls.docs ||= OpenStruct.new
+ release.urls.docs.browse = "/documentation/#{release.version}/"
+ release.urls.docs.pdf = "#{DOCS_PREFIX}/#{release.version}/torquebox-docs-en_US-#{release.version}.pdf"
+ release.urls.docs.html_multi_zip = "#{DOCS_PREFIX}/#{release.version}/torquebox-docs-en_US-#{release.version}-html.zip"
+
+ release.urls.jira = "https://jira.jboss.org/jira/secure/IssueNavigator.jspa?reset=true&amp;fixfor=#{release.jira_version}&amp;pid=12310812&amp;sorter/field=issuekey&amp;sorter/order=DESC"
+
+ release.urls.github ||= OpenStruct.new
+ release.urls.github.log = "http://github.com/torquebox/torquebox/commits/#{release.version}"
+ release.urls.github.tree = "http://github.com/torquebox/torquebox/tree/#{release.version}"
+ end
+
+ def before_beta21(release)
+ release.urls.dist_zip = "#{REPO_PREFIX}/torquebox-bin/#{release.version}/torquebox-bin-#{release.version}.zip"
+ end
+
+ def after_beta21(release)
+ release.urls.dist_zip = "#{REPO_PREFIX}/torquebox-dist/#{release.version}/torquebox-dist-#{release.version}-bin.zip"
+ end
+
+ def before_beta22(release)
+ release.urls.docs.html_single_zip = "#{DOCS_PREFIX}/#{release.version}/torquebox-docs-en_US-#{release.version}-html-single.zip"
+ end
+
+ def after_beta22(release)
+ end
+
+end
View
11 _ext/pipeline.rb
@@ -1,16 +1,23 @@
require 'rss_widget'
-require 'release_sizes'
require 'documentation'
+require 'release_sizes'
require 'downloads'
+require 'old_downloads'
require 'release_helper'
require 'toc'
Awestruct::Extensions::Pipeline.new do
+ extension Awestruct::Extensions::DataDir.new
+
extension Documentation.new()
+
+
extension Downloads.new()
+ extension OldDownloads.new()
+
extension ReleaseSizes.new()
- extension Awestruct::Extensions::DataDir.new
+
helper ReleaseHelper
extension Awestruct::Extensions::Posts.new('/news')
View
6 _ext/release_helper.rb
@@ -3,11 +3,7 @@
module ReleaseHelper
def release_for_version(version)
- site.releases.find{|e| e.version == version }
- end
-
- def taco
- "taco"
+ site.releases.find{|e| e.version == version } || site.old_releases.find{|e| e.version == version }
end
end
View
2 _ext/release_sizes.rb
@@ -8,7 +8,7 @@ def initialize()
def execute(site)
Net::HTTP.start( SERVER, 80) do |http|
- site.releases.each do |release|
+ (site.releases + site.old_releases).each do |release|
if ( release.dist_size?.nil? )
#release_path = "/maven2/releases/org/torquebox/torquebox-bin/#{release.version}/torquebox-bin-#{release.version}.zip"
release_path = release.urls.dist_zip
View
7 download.html.haml → download/index.html.haml
@@ -68,7 +68,7 @@ title: Download
%a{:href=>release.urls.docs.browse} Browse
%li
%a{:href=>release.urls.docs.html_multi_zip} Multi-page HTML ZIP
- - if ( release.urls.docs.html_single_zip )
+ - unless ( release.urls.docs.html_single_zip.empty? )
%li
%a{:href=>release.urls.docs.html_single_zip} Single-page HTML ZIP
%li
@@ -81,3 +81,8 @@ title: Download
%a{:href=>release.urls.github.log} Git Log
%td
%a{:href=>release.urls.github.tree} Browse
+
+
+%h2 Older releases
+
+Historical releases may be found on our <a href="/download/old">older releases page</a>.
View
51 download/old.html.haml
@@ -0,0 +1,51 @@
+---
+layout: default
+title: Download
+---
+
+#download-table
+ %table.downloads
+ %tr
+ %th
+ Version
+ %th
+ Binary Distribution
+ %th
+ Documentation
+ %th
+ Changelog
+ %th
+ Git Tree
+ - for release in site.old_releases
+ %tr
+ %td
+ .version
+ = release.version
+ - announcement = site.posts.find{|e| e.layout=='release' && e.version == release.version}
+ - if announcement
+ .announcement
+ %a{:href=>announcement.url} Release announcement
+ .release-date
+ = announcement.date.strftime( '%d %B %Y' )
+ %td
+ %a{:href=>release.urls.dist_zip}
+ ZIP archive (#{release.dist_size}mb)
+ %td
+ %ul
+ %li
+ %a{:href=>release.urls.docs.browse} Browse
+ %li
+ %a{:href=>release.urls.docs.html_multi_zip} Multi-page HTML ZIP
+ - if ( release.urls.docs.html_single_zip )
+ %li
+ %a{:href=>release.urls.docs.html_single_zip} Single-page HTML ZIP
+ %li
+ %a{:href=>release.urls.docs.pdf} PDF
+ %td
+ %ul
+ %li
+ %a{:href=>release.urls.jira} JIRA Issues
+ %li
+ %a{:href=>release.urls.github.log} Git Log
+ %td
+ %a{:href=>release.urls.github.tree} Browse
View
20 index.html.haml
@@ -19,26 +19,6 @@ inhibit_title: true
powerful [JBoss AS](http://www.jboss.org/jbossas) Java application server. Functionality such as clustering,
load-balancing and high-availability is included right out-of-the-box.
.right-column
- #incremental-release
- %h2 Latest Incremental Build
- %p
- We're working towards a 1.0 release in May. Since Beta 23 we've added
- tons of features and bug fixes. We strongly recommend that you work with a current build.
- %table.details
- %tr
- %th Latest Build
- %td
- %a{:href=>'/builds/LATEST/torquebox-dist-bin.zip'} ZIP
- %tr
- %th Documentation
- %td
- %a{:href=>"/documentation/DEV/"} HTML
- \|
- %a{:href=>"/torquebox-doc.pdf"} PDF
- %tr
- %th Continuous Integration
- %td
- %a{:href=>'/builds'} Build History
#latest-release
- announcement = site.posts.find{|e| e.layout=='release' && e.version == site.releases.first.version}
.download

0 comments on commit 90561c5

Please sign in to comment.