Skip to content

Commit

Permalink
Read version number from Project.toml during precompilation, fixes ds…
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Feb 20, 2023
1 parent a0032b5 commit 8ec869d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/Tulip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,9 @@ using TOML

using TimerOutputs

const _TULIP_VERSION = Ref{VersionNumber}()

function __init__()
# Read Tulip version from Project.toml file
tlp_ver = VersionNumber(TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml"))["version"])
_TULIP_VERSION[] = tlp_ver
end

version() = _TULIP_VERSION[]
# Read Tulip version from Project.toml file
const TULIP_VERSION = VersionNumber(TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml"))["version"])
version() = TULIP_VERSION

include("utils.jl")

Expand Down

0 comments on commit 8ec869d

Please sign in to comment.