From a7d7f8cef672296b62d18256d63a8e4cabf7afba Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 8 Jan 2024 14:00:50 +1100 Subject: [PATCH 1/2] Add hint for solving CLI test failure. --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index d9def7624fb..62c8b949086 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -90,7 +90,7 @@ rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md help_vm_create # only exit at the very end if [[ $changes == true ]]; then - echo "Exiting with error to indicate changes occurred..." + echo "Exiting with error to indicate changes occurred. Run `./scripts/cli.sh` and commit the changes to fix." exit 1 else echo "CLI help texts are up to date." From e74503e88a6f71e0a91c6ad720ef8dbad100caa6 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 8 Jan 2024 17:30:02 +1100 Subject: [PATCH 2/2] Add `make cli-local` --- Makefile | 7 ++++++- scripts/cli.sh | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c1190ac98cf..85d0d545f82 100644 --- a/Makefile +++ b/Makefile @@ -200,11 +200,16 @@ test-exec-engine: # test vectors. test: test-release -# Updates the CLI help text pages in the Lighthouse book. +# Updates the CLI help text pages in the Lighthouse book, building with Docker. cli: docker run --rm --user=root \ -v ${PWD}:/home/runner/actions-runner/lighthouse sigmaprime/github-runner \ bash -c 'cd lighthouse && make && ./scripts/cli.sh' + +# Updates the CLI help text pages in the Lighthouse book, building using local +# `cargo`. +cli-local: + make && ./scripts/cli.sh # Runs the entire test suite, downloading test vectors if required. test-full: cargo-fmt test-release test-debug test-ef test-exec-engine diff --git a/scripts/cli.sh b/scripts/cli.sh index 62c8b949086..768ec7b3018 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -2,7 +2,7 @@ # IMPORTANT # This script should NOT be run directly. -# Run `make cli` from the root of the repository instead. +# Run `make cli` or `make cli-local` from the root of the repository instead. set -e @@ -90,7 +90,7 @@ rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md help_vm_create # only exit at the very end if [[ $changes == true ]]; then - echo "Exiting with error to indicate changes occurred. Run `./scripts/cli.sh` and commit the changes to fix." + echo "Exiting with error to indicate changes occurred. To fix, run `make cli-local` or `make cli` and commit the changes." exit 1 else echo "CLI help texts are up to date."