Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit dc9cb27bbb4395d1d426076ae2a35021b608324e 1 parent 58d7007
Brett Buddin authored
Showing with 10 additions and 2 deletions.
  1. +9 −1 Rakefile
  2. +1 −1  js/lectric.js
View
10 Rakefile
@@ -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
2  js/lectric.js
@@ -1,5 +1,5 @@
/*!
- * Lectric
+ * Lectric v0.4
* http://github.com/mckinney/lectric
*
* Copyright 2011, McKinney
Please sign in to comment.
Something went wrong with that request. Please try again.