chore(Rakefile): generate version.json

Changes 'rake version' to output a version.json file which
contains the structured version info which can be used in other tools.
This commit is contained in:
James deBoer 2013-01-15 09:13:28 -08:00 committed by Igor Minar
parent 92c612a9de
commit 965308a32c

View file

@ -131,9 +131,15 @@ task :minify => [:init, :concat, :concat_scenario, :concat_jstd_scenario_adapter
end
desc 'Generate version.txt file'
desc 'Generate version.txt and version.json files'
task :version => [:init] do
`echo #{NG_VERSION.full} > #{path_to('version.txt')}`
`echo '{
"full": "#{NG_VERSION.full}",
"major": "#{NG_VERSION.major}",
"minor": "#{NG_VERSION.minor}",
"dot": "#{NG_VERSION.dot}",
"codename": "#{NG_VERSION.codename}"\n}' > #{path_to('version.json')}`
end