2023-12-22 17:38:37 -07:00
|
|
|
|
|
|
|
|
import std/os
|
|
|
|
|
|
2023-12-22 18:07:17 -07:00
|
|
|
const
|
|
|
|
|
currentDir = currentSourcePath().parentDir()
|
|
|
|
|
lib_path* = currentDir/"target"/"release"/"libcodex_storage_proofs.a"
|
|
|
|
|
|
2023-12-22 17:38:37 -07:00
|
|
|
static:
|
2023-12-22 18:07:17 -07:00
|
|
|
echo "\n==== CODEX:STORAGE:PROOFS: "
|
|
|
|
|
echo "cwd: ", currentDir
|
|
|
|
|
echo "lib_path: ", lib_path
|
2023-12-22 17:38:37 -07:00
|
|
|
# echo "pwd: ", projectDir()
|
|
|
|
|
# echo "cwd: ", getCurrentDir()
|
2023-12-22 18:07:17 -07:00
|
|
|
let cmd = "pwd && cargo build --release"
|
|
|
|
|
echo "\nBuilding codex-storage-proofs: " & cmd
|
|
|
|
|
let (output, exitCode) = gorgeEx cmd
|
|
|
|
|
echo output
|
|
|
|
|
if exitCode != 0:
|
|
|
|
|
# discard gorge "rm -rf " & buildDir
|
|
|
|
|
raise (ref Defect)(msg: "Failed to build codex-storage-proofs")
|
2023-12-22 17:38:37 -07:00
|
|
|
|
|
|
|
|
echo "\n===="
|