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>
28 lines
967 B
Bash
Executable File
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."
|