Compare commits
5 Commits
e24771d552
...
110b831b27
| Author | SHA1 | Date | |
|---|---|---|---|
| 110b831b27 | |||
| 67b4bb89db | |||
| ddcfa7cf41 | |||
| c694ccabd3 | |||
| 7396524bca |
0
.bump-check
Normal file
0
.bump-check
Normal file
0
.bump-check2
Normal file
0
.bump-check2
Normal file
5
.githooks/pre-commit
Executable file
5
.githooks/pre-commit
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Run the bump script to increment the patch version in pubspec.yaml and stage it
|
||||
./scripts/bump_patch_version.sh || true
|
||||
@@ -16,6 +16,9 @@ PODS:
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqflite_darwin (0.0.4):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- volume_controller (0.0.1):
|
||||
- FlutterMacOS
|
||||
- wakelock_plus (0.0.1):
|
||||
@@ -30,6 +33,7 @@ DEPENDENCIES:
|
||||
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`)
|
||||
- volume_controller (from `Flutter/ephemeral/.symlinks/plugins/volume_controller/macos`)
|
||||
- wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`)
|
||||
|
||||
@@ -50,6 +54,8 @@ EXTERNAL SOURCES:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||
shared_preferences_foundation:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
||||
sqflite_darwin:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin
|
||||
volume_controller:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/volume_controller/macos
|
||||
wakelock_plus:
|
||||
@@ -64,6 +70,7 @@ SPEC CHECKSUMS:
|
||||
package_info_plus: f0052d280d17aa382b932f399edf32507174e870
|
||||
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
|
||||
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
volume_controller: 5c068e6d085c80dadd33fc2c918d2114b775b3dd
|
||||
wakelock_plus: 917609be14d812ddd9e9528876538b2263aaa03b
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@ name: yommi_ff
|
||||
description: "A high-performance media player like nPlayer."
|
||||
publish_to: "none"
|
||||
|
||||
version: 1.0.0+1
|
||||
|
||||
version: 1.0.2+1
|
||||
environment:
|
||||
sdk: ">=3.3.3 <4.0.0"
|
||||
|
||||
|
||||
36
scripts/bump_patch_version.sh
Executable file
36
scripts/bump_patch_version.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
PUBSPEC="pubspec.yaml"
|
||||
if [[ ! -f "$PUBSPEC" ]]; then
|
||||
echo "No $PUBSPEC found in $(pwd); skipping version bump"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Use a short Python helper for robust YAML-safe replacement
|
||||
python3 - <<'PY'
|
||||
import re
|
||||
from pathlib import Path
|
||||
p = Path('pubspec.yaml')
|
||||
s = p.read_text()
|
||||
# find first version: line
|
||||
m = re.search(r"^([ \t]*version:\s*)([0-9]+)\.([0-9]+)\.([0-9]+)(\+[0-9]+)?\s*$", s, re.M)
|
||||
if not m:
|
||||
print('No parsable version line found; skipping')
|
||||
raise SystemExit(0)
|
||||
prefix = m.group(1)
|
||||
major = int(m.group(2)); minor = int(m.group(3)); patch = int(m.group(4)); build = m.group(5) or ''
|
||||
new_patch = patch + 1
|
||||
newver = f"{major}.{minor}.{new_patch}{build}"
|
||||
new_line = prefix + newver
|
||||
s2 = s[:m.start()] + new_line + s[m.end():]
|
||||
p.write_text(s2)
|
||||
print('pubspec version bumped to', newver)
|
||||
PY
|
||||
|
||||
# Stage the change so it is included in the commit
|
||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
git add "$PUBSPEC" || true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user