Merge branch 'main' of ssh://dallasgroot@10.0.0.224:22/Users/dallasgroot/NavidromePlayer/.git
This commit is contained in:
commit
32bd0654c9
2 changed files with 37 additions and 13 deletions
BIN
1024.png
Normal file
BIN
1024.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 285 KiB |
50
update.sh
50
update.sh
|
|
@ -2,17 +2,11 @@
|
|||
|
||||
# update.sh - Unzips a new NavidromePlayer.zip and replaces all project files
|
||||
# while preserving your .git history.
|
||||
#
|
||||
#
|
||||
# Usage: Place this script in your NavidromePlayer/ root directory.
|
||||
# Drop the new NavidromePlayer.zip in the SAME directory.
|
||||
# Ensure your custom 1024.png is in the SAME directory.
|
||||
# Then run: ./update.sh
|
||||
#
|
||||
# It will:
|
||||
# 1. Auto-commit any uncommitted changes
|
||||
# 2. Delete all project files (keeps .git and this script)
|
||||
# 3. Unzip the new version
|
||||
# 4. Show you what changed
|
||||
# 5. Commit with the zip's git message or a default
|
||||
|
||||
set -e
|
||||
|
||||
|
|
@ -20,6 +14,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|||
cd "$SCRIPT_DIR"
|
||||
|
||||
ZIP_FILE="NavidromePlayer.zip"
|
||||
ICON_FILE="1024.png"
|
||||
|
||||
# Check zip exists
|
||||
if [ ! -f "$ZIP_FILE" ]; then
|
||||
|
|
@ -45,13 +40,14 @@ if [ -n "$(git status --porcelain)" ]; then
|
|||
echo ""
|
||||
fi
|
||||
|
||||
# Step 2: Delete everything except .git, this script, and the zip
|
||||
# Step 2: Delete everything except .git, scripts, zip, and the custom icon
|
||||
echo "🗑 Removing old project files..."
|
||||
find . -maxdepth 1 \
|
||||
-not -name '.' \
|
||||
-not -name '.git' \
|
||||
-not -name "$ZIP_FILE" \
|
||||
-not -name 'update.sh' \
|
||||
-not -name "$ICON_FILE" \
|
||||
-exec rm -rf {} \;
|
||||
|
||||
# Step 3: Unzip
|
||||
|
|
@ -67,23 +63,51 @@ if [ -d "NavidromePlayer" ]; then
|
|||
rmdir NavidromePlayer 2>/dev/null || rm -rf NavidromePlayer
|
||||
fi
|
||||
|
||||
# Step 4: Show diff
|
||||
# Step 4: Copy custom app icon into the newly extracted targets
|
||||
if [ -f "$ICON_FILE" ]; then
|
||||
echo "🖼 Applying $ICON_FILE to iOS and watchOS AppIcon sets..."
|
||||
|
||||
IOS_ICON_DIR="iOS/Resources/Assets.xcassets/AppIcon.appiconset"
|
||||
WATCH_ICON_DIR="watchOS/Resources/Assets.xcassets/AppIcon.appiconset"
|
||||
|
||||
if [ -d "$IOS_ICON_DIR" ]; then
|
||||
cp "$ICON_FILE" "$IOS_ICON_DIR/"
|
||||
fi
|
||||
|
||||
if [ -d "$WATCH_ICON_DIR" ]; then
|
||||
cp "$ICON_FILE" "$WATCH_ICON_DIR/"
|
||||
fi
|
||||
else
|
||||
echo "⚠️ $ICON_FILE not found in root directory. Skipping icon copy."
|
||||
fi
|
||||
|
||||
# Step 5: Show diff
|
||||
echo ""
|
||||
echo "📊 Changes:"
|
||||
git add -A
|
||||
git diff --cached --stat
|
||||
echo ""
|
||||
|
||||
# Step 5: Count changes
|
||||
# Step 6: Count changes and prompt for commit message
|
||||
CHANGED=$(git diff --cached --numstat | wc -l | tr -d ' ')
|
||||
|
||||
if [ "$CHANGED" -eq "0" ]; then
|
||||
echo "✅ No changes - you're already up to date."
|
||||
git reset HEAD . > /dev/null 2>&1
|
||||
else
|
||||
# Prompt user for a commit message
|
||||
echo "📝 Enter a commit message for these $CHANGED changed files."
|
||||
read -p " (Or press Enter to use the default message): " CUSTOM_MSG
|
||||
echo ""
|
||||
|
||||
# If the user pressed enter without typing anything, use the default
|
||||
if [ -z "$CUSTOM_MSG" ]; then
|
||||
CUSTOM_MSG="Update from NavidromePlayer.zip ($(date '+%Y-%m-%d %H:%M'))"
|
||||
fi
|
||||
|
||||
# Commit
|
||||
echo "💾 Committing $CHANGED changed files..."
|
||||
git commit -m "Update from NavidromePlayer.zip ($(date '+%Y-%m-%d %H:%M'))"
|
||||
echo "💾 Committing..."
|
||||
git commit -m "$CUSTOM_MSG"
|
||||
echo ""
|
||||
echo "✅ Done! Latest commits:"
|
||||
git log --oneline -5
|
||||
|
|
|
|||
Loading…
Reference in a new issue