Skip to content

Commit 613b07c

Browse files
committed
some more stuff
1 parent cccee62 commit 613b07c

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

src/VersionsJSONUtil.jl

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,16 @@ struct OutputJsonContent
171171
internal_json::OrderedDict
172172
end
173173

174-
function OutputJsonContent(dest::OutputDestination; start_from_scratch = false)
175-
versions_json = OrderedDict()
176-
internal_json = OrderedDict()
177-
if start_from_scratch
178-
return OutputJsonContent(versions_json, internal_json)
179-
end
174+
function OutputJsonContent(dest::OutputDestination)
180175
if isfile(dest.versions_json_filename)
181176
versions_json = OrderedDict(JSON.parsefile(dest.versions_json_filename))
177+
else
178+
versions_json = OrderedDict()
182179
end
183180
if isfile(dest.internal_json_filename)
184181
internal_json = OrderedDict(JSON.parsefile(dest.internal_json_filename))
182+
else
183+
internal_json = OrderedDict()
185184
end
186185
return OutputJsonContent(versions_json, internal_json)
187186
end
@@ -351,13 +350,13 @@ function get_new_etag_for_url(url::AbstractString)::String
351350
return new_etag
352351
end
353352

354-
function main(output_directory::AbstractString; kwargs...)
355-
dest = OutputDestination(output_directory; kwargs...)
353+
function main(output_directory::AbstractString)
354+
dest = OutputDestination(output_directory)
356355
return main(dest)
357356
end
358357

359-
function main(dest::OutputDestination; kwargs...)
360-
content = OutputJsonContent(dest; kwargs...)
358+
function main(dest::OutputDestination)
359+
content = OutputJsonContent(dest)
361360
return main!(content, dest)
362361
end
363362

0 commit comments

Comments
 (0)