Skip to content

Commit 032e455

Browse files
build: add shell flag to skip the submodule update on build
1 parent aa8ac03 commit 032e455

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

scripts/build-linux-x86_64.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ RESOURCE_DIR="resources/linux-x86-64"
66
LIB_NAME="libbdkffi.so"
77

88
printf "\nSubmodule check...\n"
9-
git submodule update --init
10-
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
9+
if [[ "$1" != "--skip-submodule-update" ]]; then
10+
git submodule update --init
11+
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
12+
else
13+
printf "Skipping submodule update, using local changes.\n"
14+
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
15+
fi
1116

1217
# Move to the Rust library directory
1318
cd ./bdk-ffi/bdk-ffi/ || exit

scripts/build-macos-aarch64.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ RESOURCE_DIR="resources/darwin-aarch64"
66
LIB_NAME="libbdkffi.dylib"
77

88
printf "\nSubmodule check...\n"
9-
git submodule update --init
10-
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
9+
if [[ "$1" != "--skip-submodule-update" ]]; then
10+
git submodule update --init
11+
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
12+
else
13+
printf "Skipping submodule update, using local changes.\n"
14+
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
15+
fi
1116

1217
# Move to the Rust library directory
1318
cd ./bdk-ffi/bdk-ffi/ || exit

scripts/build-macos-x86_64.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ RESOURCE_DIR="resources/darwin-x86-64"
66
LIB_NAME="libbdkffi.dylib"
77

88
printf "\nSubmodule check...\n"
9-
git submodule update --init
10-
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
9+
if [[ "$1" != "--skip-submodule-update" ]]; then
10+
git submodule update --init
11+
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
12+
else
13+
printf "Skipping submodule update, using local changes.\n"
14+
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
15+
fi
1116

1217
# Move to the Rust library directory
1318
cd ./bdk-ffi/bdk-ffi/ || exit

scripts/build-windows-x86_64.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ RESOURCE_DIR="resources/win32-x86-64"
66
LIB_NAME="bdkffi.dll"
77

88
printf "\nSubmodule check...\n"
9-
git submodule update --init
10-
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
9+
if [[ "$1" != "--skip-submodule-update" ]]; then
10+
git submodule update --init
11+
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
12+
else
13+
printf "Skipping submodule update, using local changes.\n"
14+
printf "Submodule is checked out at commit: $(git submodule status)\n\n"
15+
fi
1116

1217
# Move to the Rust library directory
1318
cd ./bdk-ffi/bdk-ffi/ || exit

0 commit comments

Comments
 (0)