Skip to content

Commit 195d0b6

Browse files
authored
Add DataSets.PROJECT_VERSION (#28)
This allows backends to check the DataSets version without loading the associated Project.toml
1 parent 2d0b722 commit 195d0b6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DataSets"
22
uuid = "c9661210-8a83-48f0-b833-72e62abce419"
33
authors = ["Chris Foster <[email protected]> and contributors"]
4-
version = "0.2.4"
4+
version = "0.2.5"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"

src/DataSets.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ using Base: PkgId
99
export DataSet, dataset, @datafunc, @datarun
1010
export Blob, BlobTree, newfile, newdir
1111

12+
"""
13+
The current DataSets version number
14+
"""
15+
const PACKAGE_VERSION = let
16+
project = TOML.parsefile(joinpath(pkgdir(DataSets), "Project.toml"))
17+
VersionNumber(project["version"])
18+
end
19+
1220
include("paths.jl")
1321

1422
#-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)