feat: add bump-version.sh script for version management
Automates version bumps across all version source files: - Cargo.toml (PRIMARY - workspace.package.version) - debian/changelog (prepend new entry) - debian/control (update Version field) - scripts/build-package.sh (update VERSION variable) - frontend/package.json (update version field) - Stale references check after bump Usage: ./scripts/bump-version.sh <new_version> <old_version>
This commit is contained in:
27
scripts/git-hooks/install.sh
Executable file
27
scripts/git-hooks/install.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# =============================================================================
|
||||
# Linux Patch Manager — Git Hooks Installer
|
||||
# =============================================================================
|
||||
# Installs pre-commit and pre-push hooks into .git/hooks/
|
||||
# Run from repo root: ./scripts/git-hooks/install.sh
|
||||
# =============================================================================
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
||||
HOOKS_DIR="${REPO_ROOT}/.git/hooks"
|
||||
SOURCE_DIR="${REPO_ROOT}/scripts/git-hooks"
|
||||
|
||||
echo "Installing git hooks from ${SOURCE_DIR} ..."
|
||||
|
||||
for hook in pre-commit pre-push; do
|
||||
if [[ -f "${SOURCE_DIR}/${hook}" ]]; then
|
||||
cp "${SOURCE_DIR}/${hook}" "${HOOKS_DIR}/${hook}"
|
||||
chmod +x "${HOOKS_DIR}/${hook}"
|
||||
echo " ✓ Installed ${hook}"
|
||||
else
|
||||
echo " ⚠ Skipped ${hook} (not found)"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Done. Hooks will run automatically on commit and push."
|
||||
Reference in New Issue
Block a user