Skip to content

Commit

Permalink
Merge pull request #159 from thofma/version
Browse files Browse the repository at this point in the history
Version info
  • Loading branch information
wbhart authored Apr 12, 2017
2 parents b4f432f + 498e924 commit 67d7a75
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/Nemo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,51 @@ function flint_cleanup()
ccall((:flint_cleanup, libflint), Void, ())
end

###############################################################################
#
# Version information
#
################################################################################

function versioninfo()
print("Nemo version 0.6.0 \n")
nemorepo = Pkg.dir("Nemo")

print("Nemo: ")
prepo = Base.LibGit2.GitRepo(nemorepo)
Base.LibGit2.with(LibGit2.head(prepo)) do phead
print("commit: ")
print(string(LibGit2.Oid(phead))[1:8])
print(" date: ")
commit = Base.LibGit2.get(Base.LibGit2.GitCommit, prepo, LibGit2.Oid(phead))
print(Base.Dates.unix2datetime(Base.LibGit2.author(commit).time))
print(")\n")
end

finalize(prepo)

for deps in ["flint2", "arb", "antic"]
if ispath(joinpath(nemorepo, "deps", deps))
print("$deps: ")
repo = joinpath(nemorepo, "deps", deps)

prepo = Base.LibGit2.GitRepo(repo)

Base.LibGit2.with(LibGit2.head(prepo)) do phead
print("commit: ")
print(string(LibGit2.Oid(phead))[1:8])
print(" date: ")
commit = Base.LibGit2.get(Base.LibGit2.GitCommit, prepo, LibGit2.Oid(phead))
print(Base.Dates.unix2datetime(Base.LibGit2.author(commit).time))
print(")\n")
end
finalize(prepo)
end
end

return nothing
end

###############################################################################
#
# Load Nemo Rings/Fields/etc
Expand Down

0 comments on commit 67d7a75

Please sign in to comment.