mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-02 13:33:10 +00:00
Codex-contracts hash in version information. (#1207)
* Adds revision hash of codex-contracts to version information. * Update codex/conf.nim Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Ben Bierens <39762930+benbierens@users.noreply.github.com> * Update codex/conf.nim Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Ben Bierens <39762930+benbierens@users.noreply.github.com> * Update codex/rest/api.nim Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Ben Bierens <39762930+benbierens@users.noreply.github.com> * simplified git command * Remove space Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Giuliano Mega <giuliano.mega@gmail.com> * Updates openapi.yaml --------- Signed-off-by: Ben Bierens <39762930+benbierens@users.noreply.github.com> Signed-off-by: Giuliano Mega <giuliano.mega@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Giuliano Mega <giuliano.mega@gmail.com>
This commit is contained in:
parent
22f5150d1d
commit
2eb83a0ebb
@ -477,17 +477,22 @@ proc getCodexRevision(): string =
|
||||
var res = strip(staticExec("git rev-parse --short HEAD"))
|
||||
return res
|
||||
|
||||
proc getCodexContractsRevision(): string =
|
||||
let res = strip(staticExec("git rev-parse --short HEAD:vendor/codex-contracts-eth"))
|
||||
return res
|
||||
|
||||
proc getNimBanner(): string =
|
||||
staticExec("nim --version | grep Version")
|
||||
|
||||
const
|
||||
codexVersion* = getCodexVersion()
|
||||
codexRevision* = getCodexRevision()
|
||||
codexContractsRevision* = getCodexContractsRevision()
|
||||
nimBanner* = getNimBanner()
|
||||
|
||||
codexFullVersion* =
|
||||
"Codex version: " & codexVersion & "\p" & "Codex revision: " & codexRevision & "\p" &
|
||||
nimBanner
|
||||
"Codex contracts revision: " & codexContractsRevision & "\p" & nimBanner
|
||||
|
||||
proc parseCmdArg*(
|
||||
T: typedesc[MultiAddress], input: string
|
||||
|
||||
@ -914,7 +914,11 @@ proc initDebugApi(node: CodexNodeRef, conf: CodexConf, router: var RestRouter) =
|
||||
"",
|
||||
"announceAddresses": node.discovery.announceAddrs,
|
||||
"table": table,
|
||||
"codex": {"version": $codexVersion, "revision": $codexRevision},
|
||||
"codex": {
|
||||
"version": $codexVersion,
|
||||
"revision": $codexRevision,
|
||||
"contracts": $codexContractsRevision,
|
||||
},
|
||||
}
|
||||
|
||||
# return pretty json for human readability
|
||||
|
||||
@ -124,6 +124,9 @@ components:
|
||||
revision:
|
||||
type: string
|
||||
example: 0c647d8
|
||||
contracts:
|
||||
type: string
|
||||
example: 0b537c7
|
||||
|
||||
PeersTable:
|
||||
type: object
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user