Permalink
Browse files

Adding the version stamping back in until we have a better build proc…

…ess and a real project page for distribution of versions
  • Loading branch information...
Brett Buddin
Brett Buddin committed Mar 9, 2011
1 parent 58d7007 commit dc9cb27bbb4395d1d426076ae2a35021b608324e
Showing with 10 additions and 2 deletions.
  1. +9 −1 Rakefile
  2. +1 −1 js/lectric.js
View
@@ -12,10 +12,18 @@ version = File.join(prefix, 'VERSION')
task :default => :build
desc "Build and minify Lectric."
-task :build => [:lint, :minify] do
+task :build => [:lint, :stamp_version, :minify] do
puts "Lectric build complete."
end
+desc "Stamp the library with the current version"
+task :stamp_version => :version do
+ contents = File.read(lectric)
+ file = File.open(lectric, 'w')
+ file.puts contents.gsub(/(Lectric v)([\d\w\.-]+)/, "\\1#{@version}")
+ file.close
+end
+
desc "Run library against JSLint"
task :lint do
lint = JSLint::Lint.new(
View
@@ -1,5 +1,5 @@
/*!
- * Lectric
+ * Lectric v0.4
* http://github.com/mckinney/lectric
*
* Copyright 2011, McKinney

0 comments on commit dc9cb27

Please sign in to comment.