[PR #37] Fix #36: Add update mechanism and version checking to install scripts #98

Open
opened 2026-05-06 13:13:20 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/bwya77/vscode-dark-islands/pull/37
Author: @hezhamen
Created: 2/16/2026
Status: 🔄 Open

Base: mainHead: fix-update-mechanism


📝 Commits (2)

  • e0ba791 Fix #6: Improve PowerShell install script error handling
  • a68bd56 Fix #36: Add update mechanism to install scripts

📊 Changes

2 files changed (+324 additions, -56 deletions)

View changed files

📝 install.ps1 (+150 -31)
📝 install.sh (+174 -25)

📄 Description

Fixes #36

Problem

The install scripts previously provided no way for users to:

  1. Know if updates were available
  2. Check their current installed version
  3. Skip reinstallation if already on the latest version

Solution

Added comprehensive version checking and update management to both install scripts.

Changes to install.ps1 (Windows)

New Parameters:

    • Only check for updates without installing
    • Reinstall even if already on latest version

New Features:

  • Reads version from in the repo
  • Detects currently installed version from extension directory
  • Displays both versions for comparison
  • Prompts user if already on latest version (skips unnecessary work)
  • Cleans up old extension versions during installation
  • Shows helpful options when up-to-date

Usage Examples:

Changes to install.sh (macOS/Linux)

New Flags:

  • or - Only check for updates
  • or - Force reinstall
  • or - Show usage information

New Features:

  • Reads version from (uses jq if available, grep fallback)
  • Detects installed version from extension directory
  • Displays both versions with color coding
  • Prompts user if already on latest version
  • Cleans up old extension versions
  • Better error handling and user feedback

Usage Examples:
🏝️ Islands Dark Theme Installer for macOS/Linux

Repository version: 1.0.0
Installed version: Not installed

 Error: VS Code: CLI (code) not found!
Please install VS Code: and make sure 'code' command is in your PATH.
You can do this by:

  1. Open VS Code:
  2. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Linux)
  3. Type 'Shell Command: Install code command in PATH'
    🏝️ Islands Dark Theme Installer for macOS/Linux
    ================================================

Repository version: 1.0.0
Installed version: Not installed

Islands Dark is not installed.
Run without --check to install.
🏝️ Islands Dark Theme Installer for macOS/Linux

Repository version: 1.0.0
Installed version: Not installed

 Error: VS Code: CLI (code) not found!
Please install VS Code: and make sure 'code' command is in your PATH.
You can do this by:

  1. Open VS Code:
  2. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Linux)
  3. Type 'Shell Command: Install code command in PATH'

Key Improvements

  1. Version Comparison: Both scripts now compare version from repo vs installed extension
  2. Smart Installation: If already on latest version, user is asked whether to reinstall
  3. Update Checking: Users can check for updates without modifying their installation
  4. Old Version Cleanup: Automatically removes old extension versions during install
  5. Better UX: Clear version display, color coding, and helpful messages

Testing

  • Verified version reading from package.json works correctly
  • Tested version comparison logic
  • Confirmed old extension cleanup works
  • Validated user prompts and flags

Files Changed

    • Added version checking, parameters, and update logic
    • Added version checking, command-line flags, and update logic

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bwya77/vscode-dark-islands/pull/37 **Author:** [@hezhamen](https://github.com/hezhamen) **Created:** 2/16/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-update-mechanism` --- ### 📝 Commits (2) - [`e0ba791`](https://github.com/bwya77/vscode-dark-islands/commit/e0ba791a6e19571c491e12fc5865b89510cd5999) Fix #6: Improve PowerShell install script error handling - [`a68bd56`](https://github.com/bwya77/vscode-dark-islands/commit/a68bd567b9e883a1008b3a605f1fd0755bb6f633) Fix #36: Add update mechanism to install scripts ### 📊 Changes **2 files changed** (+324 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `install.ps1` (+150 -31) 📝 `install.sh` (+174 -25) </details> ### 📄 Description Fixes #36 ## Problem The install scripts previously provided no way for users to: 1. Know if updates were available 2. Check their current installed version 3. Skip reinstallation if already on the latest version ## Solution Added comprehensive version checking and update management to both install scripts. ### Changes to install.ps1 (Windows) **New Parameters:** - - Only check for updates without installing - - Reinstall even if already on latest version **New Features:** - Reads version from in the repo - Detects currently installed version from extension directory - Displays both versions for comparison - Prompts user if already on latest version (skips unnecessary work) - Cleans up old extension versions during installation - Shows helpful options when up-to-date **Usage Examples:** ### Changes to install.sh (macOS/Linux) **New Flags:** - or - Only check for updates - or - Force reinstall - or - Show usage information **New Features:** - Reads version from (uses jq if available, grep fallback) - Detects installed version from extension directory - Displays both versions with color coding - Prompts user if already on latest version - Cleans up old extension versions - Better error handling and user feedback **Usage Examples:** 🏝️ Islands Dark Theme Installer for macOS/Linux ================================================ Repository version: 1.0.0 Installed version: Not installed ❌ Error: VS Code: CLI (code) not found! Please install VS Code: and make sure 'code' command is in your PATH. You can do this by: 1. Open VS Code: 2. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Linux) 3. Type 'Shell Command: Install code command in PATH' 🏝️ Islands Dark Theme Installer for macOS/Linux ================================================ Repository version: 1.0.0 Installed version: Not installed Islands Dark is not installed. Run without --check to install. 🏝️ Islands Dark Theme Installer for macOS/Linux ================================================ Repository version: 1.0.0 Installed version: Not installed ❌ Error: VS Code: CLI (code) not found! Please install VS Code: and make sure 'code' command is in your PATH. You can do this by: 1. Open VS Code: 2. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Linux) 3. Type 'Shell Command: Install code command in PATH' ### Key Improvements 1. **Version Comparison**: Both scripts now compare version from repo vs installed extension 2. **Smart Installation**: If already on latest version, user is asked whether to reinstall 3. **Update Checking**: Users can check for updates without modifying their installation 4. **Old Version Cleanup**: Automatically removes old extension versions during install 5. **Better UX**: Clear version display, color coding, and helpful messages ### Testing - Verified version reading from package.json works correctly - Tested version comparison logic - Confirmed old extension cleanup works - Validated user prompts and flags ### Files Changed - - Added version checking, parameters, and update logic - - Added version checking, command-line flags, and update logic --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vscode-dark-islands#98
No description provided.