Private
Public Access
1
0
Files
linux_patch_manager/scripts/git-hooks/install.sh
git-echo 124b5b0e3b 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>
2026-05-28 10:52:16 -05:00

28 lines
967 B
Bash
Executable File

#!/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."