Skip to content

Commit 8c4ba65

Browse files
jbdeboerjamessharp
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 13e5f31 commit 8c4ba65

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
@@ -112,9 +112,15 @@ task :minify => [:init, :concat, :concat_scenario] do
112112
end
113113

114114

115-
desc 'Generate version.txt file'
115+
desc 'Generate version.txt and version.json files'
116116
task :version => [:init] do
117117
`echo #{NG_VERSION.full} > #{path_to('version.txt')}`
118+
`echo '{
119+
"full": "#{NG_VERSION.full}",
120+
"major": "#{NG_VERSION.major}",
121+
"minor": "#{NG_VERSION.minor}",
122+
"dot": "#{NG_VERSION.dot}",
123+
"codename": "#{NG_VERSION.codename}"\n}' > #{path_to('version.json')}`
118124
end
119125

120126

0 commit comments

Comments
 (0)