File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,8 +90,24 @@ task :runtime => [:compile] do |task|
9090 Rake ::Task [ "dist/handlebars.runtime.js" ] . execute
9191end
9292
93+ # Updates the various version numbers.
94+ task :version => [ ] do |task |
95+ # TODO : Pull from package.json when the version numbers are synced
96+ version = File . read ( "lib/handlebars/base.js" ) . match ( /Handlebars.VERSION = "(.*)";/ ) [ 1 ]
97+
98+ content = File . read ( "bower.json" )
99+ File . open ( "bower.json" , "w" ) do |file |
100+ file . puts content . gsub ( /"version":.*/ , "\" version\" : \" #{ version } \" ," )
101+ end
102+
103+ content = File . read ( "handlebars.js.nuspec" )
104+ File . open ( "handlebars.js.nuspec" , "w" ) do |file |
105+ file . puts content . gsub ( /<version>.*<\/ version>/ , "<version>#{ version } </version>" )
106+ end
107+ end
108+
93109desc "build the build and runtime version of handlebars"
94- task :release => [ :build , :runtime ]
110+ task :release => [ :version , : build, :runtime ]
95111
96112directory "vendor"
97113
You can’t perform that action at this time.
0 commit comments