fix: resolve CHANGELOG version mismatch and Android clean hanging issue
- Fix CHANGELOG.md version from [1.0.7] to [1.0.8-beta] to match package.json - Replace problematic clean:android npm script with robust clean-android.sh script - Add timeout protection (30s) to prevent adb commands from hanging indefinitely - Include cross-platform timeout fallback using perl for macOS compatibility - Improve logging and error handling for Android cleanup process Fixes team member reported issues: - CHANGELOG version inconsistency - clean:android getting stuck during execution
This commit is contained in:
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.0.7] - 2025.08.18
|
||||
## [1.0.8-beta] - 2025.08.18
|
||||
### Fixed
|
||||
- Deep link for onboard-meeting-members
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
"build:electron:dmg:dev": "./scripts/build-electron.sh --dev --dmg",
|
||||
"build:electron:dmg:test": "./scripts/build-electron.sh --test --dmg",
|
||||
"build:electron:dmg:prod": "./scripts/build-electron.sh --prod --dmg",
|
||||
"clean:android": "adb uninstall app.timesafari.app || true",
|
||||
"clean:android": "./scripts/clean-android.sh",
|
||||
"clean:ios": "rm -rf ios/App/build ios/App/Pods ios/App/output ios/App/App/public ios/DerivedData ios/capacitor-cordova-ios-plugins ios/App/App/capacitor.config.json ios/App/App/config.xml || true",
|
||||
"clean:electron": "./scripts/build-electron.sh --clean",
|
||||
"clean:all": "npm run clean:ios && npm run clean:android && npm run clean:electron",
|
||||
|
||||
62
scripts/clean-android.sh
Executable file
62
scripts/clean-android.sh
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
# clean-android.sh
|
||||
# Author: Matthew Raymer
|
||||
# Date: 2025-08-19
|
||||
# Description: Clean Android app with timeout protection to prevent hanging
|
||||
# This script safely uninstalls the TimeSafari app from connected Android devices
|
||||
# with a 30-second timeout to prevent indefinite hanging.
|
||||
|
||||
# Exit on any error
|
||||
set -e
|
||||
|
||||
# Source common utilities
|
||||
source "$(dirname "$0")/common.sh"
|
||||
|
||||
# Function to implement timeout for systems without timeout command
|
||||
timeout_command() {
|
||||
local timeout_seconds="$1"
|
||||
shift
|
||||
|
||||
# Check if timeout command exists
|
||||
if command -v timeout &> /dev/null; then
|
||||
timeout "$timeout_seconds" "$@"
|
||||
else
|
||||
# Fallback for systems without timeout (like macOS)
|
||||
# Use perl to implement timeout
|
||||
perl -e '
|
||||
eval {
|
||||
local $SIG{ALRM} = sub { die "timeout" };
|
||||
alarm shift;
|
||||
system @ARGV;
|
||||
alarm 0;
|
||||
};
|
||||
if ($@) { exit 1; }
|
||||
' "$timeout_seconds" "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
log_info "Starting Android cleanup process..."
|
||||
|
||||
# Check if adb is available
|
||||
if ! command -v adb &> /dev/null; then
|
||||
log_error "adb command not found. Please install Android SDK Platform Tools."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for connected devices
|
||||
log_info "Checking for connected Android devices..."
|
||||
if adb devices | grep -q 'device$'; then
|
||||
log_info "Android device(s) found. Attempting to uninstall app..."
|
||||
|
||||
# Try to uninstall with timeout
|
||||
if timeout_command 30 adb uninstall app.timesafari.app; then
|
||||
log_success "Successfully uninstalled TimeSafari app"
|
||||
else
|
||||
log_warn "Uninstall failed or timed out after 30 seconds"
|
||||
log_info "This is normal if the app wasn't installed or device is unresponsive"
|
||||
fi
|
||||
else
|
||||
log_info "No Android devices connected. Skipping uninstall."
|
||||
fi
|
||||
|
||||
log_success "Android cleanup process completed"
|
||||
Reference in New Issue
Block a user