brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [1/2] incubator-brooklyn git commit: add way to access files on github in docs
Date Mon, 22 Dec 2014 18:36:04 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 1d32eb284 -> c97eaae20


add way to access files on github in docs


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/2d18541f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/2d18541f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/2d18541f

Branch: refs/heads/master
Commit: 2d18541fb303e946543f7b451f9b07f170fb1972
Parents: c4d907a
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Mon Dec 22 13:59:20 2014 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Mon Dec 22 13:59:20 2014 +0000

----------------------------------------------------------------------
 docs/_config.yml                   | 2 ++
 docs/_plugins/brooklyn_metadata.rb | 9 +++++++++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/2d18541f/docs/_config.yml
----------------------------------------------------------------------
diff --git a/docs/_config.yml b/docs/_config.yml
index 7086d35..c889861 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -42,3 +42,5 @@ exclude: ['/Gemfile*','/README.md']
 brooklyn-version: 0.7.0-SNAPSHOT # BROOKLYN_VERSION
 brooklyn-snapshot-git-branch: master   # if line above is SNAPSHOT this should point to corresponding
git branch (e.g. master, 0.4)
 
+# This is auto-detected, but you can override it if needed.
+# git-branch: master

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/2d18541f/docs/_plugins/brooklyn_metadata.rb
----------------------------------------------------------------------
diff --git a/docs/_plugins/brooklyn_metadata.rb b/docs/_plugins/brooklyn_metadata.rb
index c3b5483..3348546 100644
--- a/docs/_plugins/brooklyn_metadata.rb
+++ b/docs/_plugins/brooklyn_metadata.rb
@@ -15,6 +15,7 @@ module BrooklynMetadata
       is_snapshot = BrooklynMetadata::BROOKLYN_VERSION.end_with?('-SNAPSHOT')
       
       if is_snapshot
+        git_branch = 'master' unless site.data['git_branch']
         url_set = {
             "search" => {
                 "all" => "https://oss.sonatype.org/index.html#nexus-search;gav~io.brooklyn~~#{
BrooklynMetadata::BROOKLYN_VERSION }~~",
@@ -31,7 +32,9 @@ module BrooklynMetadata
                 "jar" => "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn&v=#{
BrooklynMetadata::BROOKLYN_VERSION }}&a=brooklyn-all&c=with-dependencies&e=jar"
             }
         }
+        
       else
+        git_branch = BrooklynMetadata::BROOKLYN_VERSION unless site.data['git_branch']
         url_set = {
             "search" => {
                 "all" => "http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22io.brooklyn%22%20AND%20v%3A%22#{
BrooklynMetadata::BROOKLYN_VERSION }%22",
@@ -50,11 +53,17 @@ module BrooklynMetadata
         }
       end
       
+      url_set["git"] = "https://github.com/apache/incubator-brooklyn/tree/#{ git_branch }"
+      
       site.data['brooklyn'] = {
           "version" => BrooklynMetadata::BROOKLYN_VERSION,
           "is_snapshot" => is_snapshot,
           "url" => url_set
       }
+      
+      # TODO check that "#{ brooklyn['url']['git'] }/core/src/main/java/brooklyn/BrooklynVersion.java"
+      # exists AND contains "versionFromStatic = \"#{ brooklyn['version'] }\""
+  
     end
   end
 end


Mime
View raw message