Files
hyprcrd/bump.sh
T
thandClaude Opus 4.6 b9bd294c90 fix: image resize preview, todo checkbox alignment, modal overflow clip
- Image resize respects width attr in preview (no more snap-back)
- Single-task checkbox aligned with flex center instead of translateY hack
- Modal/detail containers clip card-bar at rounded corners
- Right-click on image no longer triggers resize (left-button only)
- Split dist.sh and bump.sh into separate scripts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 12:17:24 +02:00

41 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Bump version in config.php + electron/package.json
set -e
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "Usage: ./bump.sh [--patch|--minor|--major]"
echo ""
echo " --patch bump patch version (default) 1.3.5 → 1.3.6"
echo " --minor bump minor version 1.3.6 → 1.4.0"
echo " --major bump major version 1.4.0 → 2.0.0"
exit 0
fi
cd "$(dirname "$0")"
CURRENT=$(grep "APP_VERSION" config.php | grep -oP "'[^']+'" | tail -1 | tr -d "'")
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
case "${1:---patch}" in
--major) MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0 ;;
--minor) MINOR=$((MINOR + 1)); PATCH=0 ;;
*) PATCH=$((PATCH + 1)) ;;
esac
VERSION="${MAJOR}.${MINOR}.${PATCH}"
# config.php
sed -i "s/APP_VERSION', '${CURRENT}'/APP_VERSION', '${VERSION}'/" config.php
# electron/package.json
if [ -f electron/package.json ]; then
sed -i "s/\"version\": \"${CURRENT}\"/\"version\": \"${VERSION}\"/" electron/package.json
fi
# website footer
if [ -f website/index.html ]; then
sed -i "s/v${CURRENT}/v${VERSION}/g" website/index.html
fi
echo "${CURRENT} → ${VERSION}"