2020-03-04 21:01:23 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
|
2020-03-11 14:30:25 +00:00
|
|
|
source "${NAVI_HOME}/scripts/install"
|
2020-03-04 21:01:23 +00:00
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
_commit() {
|
|
|
|
if [ -n "${DOTFILES:-}" ]; then
|
|
|
|
git add --all || true
|
|
|
|
dot git commit am || true
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-03-12 17:57:02 +00:00
|
|
|
cd "$NAVI_HOME"
|
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
_commit
|
|
|
|
log::note "cargo clippy fix..."
|
2020-04-20 21:29:48 +00:00
|
|
|
cargo +nightly clippy --fix -Z unstable-options || true
|
2020-03-11 14:30:25 +00:00
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
_commit
|
|
|
|
log::note "cargo fix..."
|
2020-03-12 17:57:02 +00:00
|
|
|
cargo fix || true
|
2020-03-11 14:30:25 +00:00
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
_commit
|
|
|
|
log::note "cargo fmt..."
|
2020-03-12 17:57:02 +00:00
|
|
|
cargo fmt || true
|
2020-03-11 14:30:25 +00:00
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
_commit
|
|
|
|
log::note "clippy..."
|
2021-04-04 21:06:35 +00:00
|
|
|
cargo clippy || true
|
|
|
|
|
2021-04-19 12:54:35 +00:00
|
|
|
_commit
|
|
|
|
log::note "dot code beautify..."
|
2020-03-12 17:57:02 +00:00
|
|
|
find scripts -type f | xargs -I% dot code beautify % || true
|
2021-08-07 18:57:22 +00:00
|
|
|
dot code beautify "${NAVI_HOME}/shell/navi.plugin.bash" || true
|
|
|
|
dot code beautify "${NAVI_HOME}/shell/navi.plugin.zsh" || true
|
2020-03-19 12:19:50 +00:00
|
|
|
dot code beautify "${NAVI_HOME}/tests/core.bash" || true
|
|
|
|
dot code beautify "${NAVI_HOME}/tests/run" || true
|