ledger-wallet-daemon ·
Updating the libcore
When a new version of the libcore is available, we need to update our bindings.
| Prerequisite | Remarks | | ============================================== | ========================================= | | docker | Only needed if you plan to build in local | | sbt | |
-
Check out lib core project
git clone --recurse-submodules --depth 1 --branch <branch_or_version_tag> https://github.com/LedgerHQ/lib-ledger-core
-
Copy
build-jar.sh
andbuild-jar-linux.sh
to the lib core project foldercp $WALLET_DAEMON_FOLDER/build-jar.sh $LIB_CORE_FOLDER cp $WALLET_DAEMON_FOLDER/build-jar-linux.sh $LIB_CORE_FOLDER
-
cd
to lib core foldercd $LIB_CORE_FOLDER
-
Two possible situations: either you want a fresh build from your local machine, or you want to grab the official lib core artifacts.
- For building on your machine, run the script
build-jar.sh
with command:mac
,linux
orall
. MacOS can build bothmac
andlinux
. Linux can only buildlinux
.# Build for mac only. You may want to do this when developing, # it's much faster than build for both mac and linux bash build-jar.sh mac # Build for linux. Linux build is using docker. bash build-jar.sh linux # Build for both mac and linux bash build-jar.sh all
- For getting the official release, pass an extra argument
dl
to the command invocation.# Get only the mac release artifacts. ./build-jar.sh mac dl # Get only the linux artifacts. ./build-jar.sh linux dl # Get both. ./build-jar.sh all dl
- For building on your machine, run the script
-
Then, you find the jar file in
$LIB_CORE_FOLDER/../build-jar/target/scala-<version>/build-jar-<version>.jar
. Replace theledger-lib-core.jar
in the lib folder with this file.mv $LIB_CORE_FOLDER/../build-jar/target/scala-<version>/build-jar-<version>.jar $WALLET_DAEMON_FOLDER/lib/ledger-lib-core.jar
-
Push the changes to upstream
-
Add a tag on the new commit with the version of the ledger-core-lib, or the commit hash if no version was tagged