Update error logs and README for submodules

This commit is contained in:
teor 2021-11-09 10:31:53 +10:00
parent 1caa29e975
commit 4dfb28b679
2 changed files with 30 additions and 7 deletions

View File

@ -13,18 +13,41 @@
Rust bindings to the ECC's `zcash_script` c++ library.
### Updating `depend/zcash`
To pull in recent changes from the upstream repo run the following:
### Cloning and checking out `depend/zcash`
Clone this repository using:
```console
git subtree pull -P depend/zcash <repo> <branch> --squash
git clone --recurse-submodules
```
For example:
Or if you've already cloned:
```console
git submodule update --init
```
To pull the latest version, use:
```console
git pull --recurse-submodules
```
### Updating `depend/zcash`
If you need to change the submodule's base branch:
```console
git config -f .gitmodules submodule.depend/zcash.branch <branch-name>
```
To pull in recent changes from the upstream repo:
```console
git subtree pull -P depend/zcash https://github.com/str4d/zcash.git zcash-script-precompute --squash
git submodule update --remote
```
To use a specific commit:
```console
cd depend/zcash
git checkout <commit-hash>
```
### Publishing New Releases

View File

@ -12,7 +12,7 @@ enum Error {
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Error::GenerateBindings => write!(f, "unable to generate bindings"),
Error::GenerateBindings => write!(f, "unable to generate bindings: try running 'git submodule init' and 'git submodule update'"),
Error::WriteBindings(source) => write!(f, "unable to write bindings: {}", source),
Error::Env(source) => source.fmt(f),
}