Skip to content

Commit 965308a

Browse files
jbdeboerIgorMinar
authored andcommitted
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.
1 parent 92c612a commit 965308a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Rakefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,15 @@ task :minify => [:init, :concat, :concat_scenario, :concat_jstd_scenario_adapter
131131
end
132132

133133

134-
desc 'Generate version.txt file'
134+
desc 'Generate version.txt and version.json files'
135135
task :version => [:init] do
136136
`echo #{NG_VERSION.full} > #{path_to('version.txt')}`
137+
`echo '{
138+
"full": "#{NG_VERSION.full}",
139+
"major": "#{NG_VERSION.major}",
140+
"minor": "#{NG_VERSION.minor}",
141+
"dot": "#{NG_VERSION.dot}",
142+
"codename": "#{NG_VERSION.codename}"\n}' > #{path_to('version.json')}`
137143
end
138144

139145

0 commit comments

Comments
 (0)