Permalink
Browse files

Add 'rake summary'

  • Loading branch information...
1 parent b66122c commit 36cee0846971a303ec86f1aef3d6a98767e5d0f1 @andreyvit andreyvit committed Jan 13, 2013
Showing with 28 additions and 0 deletions.
  1. +5 −0 Rakefile
  2. +23 −0 summary.coffee
View
@@ -227,3 +227,8 @@ task :default do
puts ENV['INSTALL']
puts find_gem('compass', :prerelease => true )
end
+
+desc "Print a summary of the bundled compiler versions"
+task :summary do
+ sh 'coffee', 'summary.coffee'
+end
View
@@ -0,0 +1,23 @@
+Path = require 'path'
+fs = require 'fs'
+
+ROOT = __dirname
+
+for dirName in fs.readdirSync(ROOT) when (m = dirName.match /^(.*)\.lrplugin$/)
+ name = m[1]
+
+ versionsFile = Path.join(ROOT, dirName, 'versions.json')
+ if fs.existsSync(versionsFile)
+ versions = JSON.parse(fs.readFileSync(versionsFile))
+
+ masterVersion = versions['.']
+ delete versions['.']
+
+ unless masterVersion.match /,/
+ masterVersion = "#{name} #{masterVersion}"
+
+ # otherVersions = ("#{gem} #{gemVer}" for own gem, gemVer of versions).join(", ")
+ # if otherVersions
+ # otherVersions = " (#{otherVersions})"
+
+ console.log "#{masterVersion}"

0 comments on commit 36cee08

Please sign in to comment.