Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Commit

Permalink
Adding the version stamping back in until we have a better build proc…
Browse files Browse the repository at this point in the history
…ess and a real project page for distribution of versions
  • Loading branch information
Brett Buddin committed Mar 9, 2011
1 parent 58d7007 commit dc9cb27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion js/lectric.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Lectric
* Lectric v0.4
* http://github.com/mckinney/lectric
*
* Copyright 2011, McKinney
Expand Down

0 comments on commit dc9cb27

Please sign in to comment.