xworkmate-app/scripts/sync-version.sh
Haitao Pan 9987c0cc9f test: mock device and package plugins and increase timeout
- Increase sync loop timeout in thread workspace binding test to avoid flakiness
- Mock device_info and package_info plugins for gateway runtime tests
- Update pubspec.yaml version
2026-06-30 10:19:32 +08:00

18 lines
553 B
Bash
Executable File

#!/bin/bash
set -e
# Extract current version from pubspec.yaml if not provided
# but here the user requested: version: 1.1.5+2
TARGET_VERSION="1.1.5+2"
DATE=$(date +%Y-%m-%d)
COMMIT=$(git rev-parse --short HEAD)
# Update version in pubspec.yaml
sed -i.bak -e "s/^version: .*/version: ${TARGET_VERSION}/" \
-e "s/^build-date: .*/build-date: ${DATE}/" \
-e "s/^build-id: .*/build-id: ${COMMIT}/" pubspec.yaml
rm -f pubspec.yaml.bak
echo "Updated pubspec.yaml to version=${TARGET_VERSION}, build-date=${DATE}, build-id=${COMMIT}"