File tree Expand file tree Collapse file tree 4 files changed +44
-6
lines changed
Expand file tree Collapse file tree 4 files changed +44
-6
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # Git post-checkout hook - updates submodules after checkout
3+ #
4+ # This hook runs after:
5+ # - git checkout
6+ # - git switch
7+ # - git clone (with checkout)
8+ #
9+ # Arguments:
10+ # $1 - ref of previous HEAD
11+ # $2 - ref of new HEAD
12+ # $3 - flag (1 = branch checkout, 0 = file checkout)
13+
14+ # Only run on branch checkouts, not file checkouts
15+ if [ " $3 " = " 0" ]; then
16+ exit 0
17+ fi
18+
19+ echo " Updating submodules..."
20+ git submodule update --init --recursive --remote
21+
22+ exit 0
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # Git post-commit hook - updates submodules after each commit
3+ #
4+ # This hook runs after every local commit, ensuring submodules
5+ # stay up to date with their tracked branches.
6+
7+ echo " Updating submodules..."
8+ git submodule update --init --recursive --remote
9+
10+ exit 0
Original file line number Diff line number Diff line change 1- # Mise configuration for InferaDB
1+ # Mise configuration for InferaDB Rust SDK
22# https://mise.jdx.dev/
33#
44# Mise is used for:
5- # - Tool installation (Rust, cargo extensions, protobuf )
5+ # - Tool installation (Rust, cargo extensions)
66# - Environment variable configuration
77# - One-time development setup
88#
99# For daily development, use standard cargo commands.
10- # See Makefile for convenient shortcuts .
10+ # See README.md for common development workflows .
1111
1212[tools ]
1313rust = " stable"
@@ -25,8 +25,10 @@ CARGO_BUILD_JOBS = "{{ num_cpus() }}"
2525[tasks .setup ]
2626description = " One-time development environment setup"
2727run = [
28+ " git config core.hooksPath .githooks" ,
29+ " git submodule update --init --recursive" ,
2830 " rustup component add rustfmt clippy rust-src rust-analyzer" ,
31+ " rustup toolchain install nightly --component rustfmt" ,
2932 " cargo fetch" ,
3033 " echo '\n ✅ Setup complete! Use standard cargo commands for development.'" ,
31- " echo 'Run \" make help\" to see available shortcuts.\n '" ,
3234]
Original file line number Diff line number Diff line change 1414
1515``` bash
1616mise trust && mise install
17- rustup component add rustfmt clippy
18- rustup toolchain install nightly --component rustfmt
17+ mise run setup # Configures git hooks and initializes proto submodule
1918```
2019
20+ The setup task runs:
21+ - ` git config core.hooksPath .githooks ` - Use version-controlled hooks
22+ - ` git submodule update --init --recursive ` - Initialize proto submodule
23+ - Installs rustfmt, clippy, and nightly toolchain
24+
2125## Build Commands
2226
2327``` bash
You can’t perform that action at this time.
0 commit comments