mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-07 21:45:43 +09:00
add: build info to db and cache
This commit is contained in:
parent
c122912fe8
commit
ecf849ae8a
2 changed files with 4 additions and 3 deletions
|
@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- `create_database`(formally `create_database_from_exported_csvs`) now can save a JLD2 cache to store parsed slave logs.
|
||||
- Docs: add index page for published notebooks
|
||||
- Added converter git version info (`git describe --dirty`) to the database and JLD2 cache.
|
||||
- Added converter git version info (`git describe --dirty`) and build datetime info to the database and JLD2 cache.
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -13,17 +13,18 @@ function insert_version_info(db::SQLite.DB, jld2_slavelog::JLD2.JLDFile)
|
|||
""",
|
||||
)
|
||||
converter_git_describe = try
|
||||
read(`git describe --dirty`, String)
|
||||
read(`git describe --dirty`, String) |> chomp
|
||||
catch e
|
||||
@warn "Failed to get git describe: $e"
|
||||
""
|
||||
end
|
||||
@info "converter version info" converter = pkgversion(@__MODULE__) |> string converter_git_describe
|
||||
datetime = round(Int64, datetime2unix(now())) |> string
|
||||
DBInterface.execute(
|
||||
stmt_insert_version,
|
||||
(;
|
||||
converter = pkgversion(@__MODULE__) |> string,
|
||||
converter_git = converter_git_describe,
|
||||
converter_git = converter_git_describe * '+' * datetime,
|
||||
),
|
||||
)
|
||||
jld2_slavelog["meta"] = converter_git_describe
|
||||
|
|
Loading…
Add table
Reference in a new issue