Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added no-build flag #56

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function usage {
echo "-g|--gdb: start speculos with -d (waiting for gdb debugger)"
echo "-a|--analyze run static code analysis"
echo "-v|--variant build for 'iota' or 'shimmer'"
echo "-n|--nobuild don't build the app new"
exit 1
}

Expand Down Expand Up @@ -83,6 +84,7 @@ analysis=0
pull=0
cxlib=""
variant=""
nobuild=0
while (( $# ))
do
case "$1" in
Expand Down Expand Up @@ -122,6 +124,9 @@ do
"-p" | "--pull")
pull=1
;;
"-n" | "--nobuild")
nobuild=1
;;
*)
error "unknown parameter: $1"
;;
Expand Down Expand Up @@ -187,11 +192,13 @@ cmd="make clean && $build_flags make "
cmd+="&& $build_flags make load"
}

docker run \
$extra_args \
--rm -v "$rpath:/app" \
ledger-app-builder \
bash -c "$cmd" || error "building failed"
(( !nobuild )) && {
docker run \
$extra_args \
--rm -v "$rpath:/app" \
ledger-app-builder \
bash -c "$cmd" || error "building failed"
}

(( $load )) && {
# we are finished
Expand Down
Loading