Skip to content
Snippets Groups Projects
Verified Commit 490daeeb authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Make version readout future proof

parent 78251281
No related branches found
No related tags found
1 merge request!21Make version readout future proof
......@@ -14,6 +14,7 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
UnROOT = "3cd96dde-e98d-4713-81e9-a4a1b0235ce9"
......
......@@ -7,9 +7,16 @@ using Printf: @printf
using Dates: DateTime, datetime2unix, unix2datetime
using Sockets
using UUIDs
using TOML
import Pkg
const version = VersionNumber(Pkg.TOML.parsefile(joinpath(pkgdir(KM3io), "Project.toml"))["version"])
const version = let
if VERSION < v"1.9"
VersionNumber(TOML.parsefile(joinpath(pkgdir(KM3io), "Project.toml"))["version"])
else
pkgversion(KM3io)
end
end
using DocStringExtensions
using StaticArrays: FieldVector, @SArray, SVector
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment