Browse Source

devmode hook pre-push

main
pvincent 2 weeks ago
parent
commit
f20d497115
  1. 10
      README.md
  2. 7
      lib/devmode.bash
  3. 1
      test/miaou-bash.test.bash

10
README.md

@ -27,17 +27,19 @@ We would love to hear your thoughts! Any feedback, suggestions, or contributions
are greatly appreciated. are greatly appreciated.
-- [contact@artcode.re](mailto:contact@artcode.re) -- [contact@artcode.re](mailto:contact@artcode.re)
## install
## Get started
### install
<!-- markdownlint-disable MD013 MD025 --> <!-- markdownlint-disable MD013 MD025 -->
`source <(curl -s https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh)` `source <(curl -s https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh)`
## upgrade
### upgrade
`miaou-bash --self-upgrade` `miaou-bash --self-upgrade`
## uninstall
### uninstall
`miaou-bash --uninstall
`miaou-bash --uninstall`
## Readline main bindings ## Readline main bindings

7
lib/devmode.bash

@ -25,6 +25,13 @@ function dev_mode {
git clone "$GIT_URL" git clone "$GIT_URL"
sudo rm "$MIAOU_BASH_DIR" -rf sudo rm "$MIAOU_BASH_DIR" -rf
sudo ln -s "$target" "$MIAOU_BASH_DIR" sudo ln -s "$target" "$MIAOU_BASH_DIR"
local hook="$target"/.git/hooks/pre-push
cat >"$hook" <<EOF
#!/usr/bin/env bash
test/miaou-bash.test.bash
EOF
chmod +x "$hook"
} }
function assert_reachable_target { function assert_reachable_target {

1
test/miaou-bash.test.bash

@ -195,3 +195,4 @@ if [[ $failed -gt 0 ]]; then
else else
echo "100% passed, ${test_count} tests" echo "100% passed, ${test_count} tests"
fi fi
exit 12
Loading…
Cancel
Save