180
180
181
181
# # julia version info
182
182
183
- begin
184
183
# Include build number if we've got at least some distance from a tag (e.g. a release)
185
184
build_number = BUILD_INFO. build_number != 0 ? " +$(BUILD_INFO. build_number) " : " "
186
185
try
@@ -190,47 +189,54 @@ catch e
190
189
global const VERSION = VersionNumber (0 )
191
190
end
192
191
193
- if BUILD_INFO. tagged_commit
194
- const commit_string = BUILD_INFO. TAGGED_RELEASE_BANNER
195
- elseif BUILD_INFO. commit == " "
196
- const commit_string = " "
197
- else
198
- local days = int (floor ((ccall (:clock_now , Float64, ()) - BUILD_INFO. fork_master_timestamp) / (60 * 60 * 24 )))
199
- if BUILD_INFO. fork_master_distance == 0
200
- const commit_string = " Commit $(BUILD_INFO. commit_short) ($(days) days old master)"
192
+ function banner ()
193
+ if BUILD_INFO. tagged_commit
194
+ const commit_string = BUILD_INFO. TAGGED_RELEASE_BANNER
195
+ elseif BUILD_INFO. commit == " "
196
+ const commit_string = " "
201
197
else
202
- const commit_string = " $(BUILD_INFO. branch) /$(BUILD_INFO. commit_short) (fork: $(BUILD_INFO. fork_master_distance) commits, $(days) days)"
198
+ local days = int (floor ((ccall (:clock_now , Float64, ()) - BUILD_INFO. fork_master_timestamp) / (60 * 60 * 24 )))
199
+ if BUILD_INFO. fork_master_distance == 0
200
+ const commit_string = " Commit $(BUILD_INFO. commit_short) ($(days) days old master)"
201
+ else
202
+ const commit_string = " $(BUILD_INFO. branch) /$(BUILD_INFO. commit_short) (fork: $(BUILD_INFO. fork_master_distance) commits, $(days) days)"
203
+ end
204
+ end
205
+ commit_date = BUILD_INFO. date_string != " " ? " ($(BUILD_INFO. date_string) )" : " "
206
+
207
+ const banner_plain =
208
+ """
209
+ _
210
+ _ _ _(_)_ | A fresh approach to technical computing
211
+ (_) | (_) (_) | Documentation: http://docs.julialang.org
212
+ _ _ _| |_ __ _ | Type \" help()\" to list help topics
213
+ | | | | | | |/ _` | |
214
+ | | |_| | | | (_| | | Version $(VERSION )$(commit_date)
215
+ _/ |\\ __'_|_|_|\\ __'_| | $(commit_string)
216
+ |__/ | $(Sys. MACHINE)
217
+
218
+ """
219
+ local tx = " \0 33[0m\0 33[1m" # text
220
+ local jl = " \0 33[0m\0 33[1m" # julia
221
+ local d1 = " \0 33[34m" # first dot
222
+ local d2 = " \0 33[31m" # second dot
223
+ local d3 = " \0 33[32m" # third dot
224
+ local d4 = " \0 33[35m" # fourth dot
225
+ const banner_color =
226
+ """ \0 33[1m $(d3) _
227
+ $(d1) _ $(jl) _$(tx) $(d2) _$(d3) (_)$(d4) _$(tx) | A fresh approach to technical computing
228
+ $(d1) (_)$(jl) | $(d2) (_)$(tx) $(d4) (_)$(tx) | Documentation: http://docs.julialang.org
229
+ $(jl) _ _ _| |_ __ _$(tx) | Type \" help()\" to list help topics
230
+ $(jl) | | | | | | |/ _` |$(tx) |
231
+ $(jl) | | |_| | | | (_| |$(tx) | Version $(VERSION )$(commit_date)
232
+ $(jl) _/ |\\ __'_|_|_|\\ __'_|$(tx) | $(commit_string)
233
+ $(jl) |__/$(tx) | $(Sys. MACHINE)
234
+
235
+ \0 33[0m"""
236
+
237
+ if have_color
238
+ print (banner_color)
239
+ else
240
+ print (banner_plain)
203
241
end
204
242
end
205
- commit_date = BUILD_INFO. date_string != " " ? " ($(BUILD_INFO. date_string) )" : " "
206
-
207
- const banner_plain =
208
- """
209
- _
210
- _ _ _(_)_ | A fresh approach to technical computing
211
- (_) | (_) (_) | Documentation: http://docs.julialang.org
212
- _ _ _| |_ __ _ | Type \" help()\" to list help topics
213
- | | | | | | |/ _` | |
214
- | | |_| | | | (_| | | Version $(VERSION )$(commit_date)
215
- _/ |\\ __'_|_|_|\\ __'_| | $(commit_string)
216
- |__/ | $(Sys. MACHINE)
217
-
218
- """
219
- local tx = " \0 33[0m\0 33[1m" # text
220
- local jl = " \0 33[0m\0 33[1m" # julia
221
- local d1 = " \0 33[34m" # first dot
222
- local d2 = " \0 33[31m" # second dot
223
- local d3 = " \0 33[32m" # third dot
224
- local d4 = " \0 33[35m" # fourth dot
225
- const banner_color =
226
- " \0 33[1m $(d3) _
227
- $(d1) _ $(jl) _$(tx) $(d2) _$(d3) (_)$(d4) _$(tx) | A fresh approach to technical computing
228
- $(d1) (_)$(jl) | $(d2) (_)$(tx) $(d4) (_)$(tx) | Documentation: http://docs.julialang.org
229
- $(jl) _ _ _| |_ __ _$(tx) | Type \" help()\" to list help topics
230
- $(jl) | | | | | | |/ _` |$(tx) |
231
- $(jl) | | |_| | | | (_| |$(tx) | Version $(VERSION )$(commit_date)
232
- $(jl) _/ |\\ __'_|_|_|\\ __'_|$(tx) | $(commit_string)
233
- $(jl) |__/$(tx) | $(Sys. MACHINE)
234
-
235
- \0 33[0m"
236
- end # begin
0 commit comments