From c9e96ab65461dfd0dbea448296414fce79f6ba7d Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Wed, 23 Jul 2025 18:56:15 -0400 Subject: [PATCH] chore: add submodule command to justfile --- README.md | 7 +++++++ justfile | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/README.md b/README.md index 72e6e9c..3e3be44 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,13 @@ The Python language bindings for the [bitcoindevkit](https://github.com/bitcoind See the [package on PyPI](https://pypi.org/project/bdkpython/). +# Working with the submodule + +This repository uses the bdk-ffi repository as a git submodule. Here are useful tips for working with the submodule: + +1. When initially cloning the repo, the `bdk-ffi` submodule will be empty locally. You can intitiate/populate the directory by using the `just submodule-init` command. +2. If you make local changes to the `bdk-ffi` directory while developing and want to hard delete all changes and return to the exact committed version hash of the bdk-ffi repo, use the `just submodule-reset` command. + ## Local Testing and Usage 1. Start a Python virtual environment diff --git a/justfile b/justfile index fd2648c..94deda6 100644 --- a/justfile +++ b/justfile @@ -16,6 +16,16 @@ clean: rm -rf ./build/ rm -rf ./dist/ +[group("Submodule")] +[doc("Initialize bdk-ffi submodule to committed hash.")] +submodule-init: + git submodule update --init + +[group("Submodule")] +[doc("Hard reset the bdk-ffi submodule to committed hash.")] +submodule-reset: + git submodule update --force + [group("Test")] [doc("Run all tests.")] test: