Remove Python installation and add one-shot install instructions

- Remove all Python-related installation logic since Module 08 is Git-only
- Update synopsis to mention repository cloning capability
- Add one-shot installation instructions using Invoke-RestMethod
- Remove Python from results tracking, installation prompts, and verification
- Simplify installation summary without Python references
- Update examples to show both one-shot and local execution methods
This commit is contained in:
Bjarke Sporring
2026-01-14 17:12:03 +01:00
parent 09f25d6eae
commit 07faa14b7a

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env pwsh
<#
.SYNOPSIS
Installs all prerequisites for the Git Workshop using winget.
Installs all prerequisites for Git Workshop using winget and clones the repository.
.DESCRIPTION
This script automates the installation of required tools for the Git Workshop:
@@ -10,14 +10,21 @@ This script automates the installation of required tools for the Git Workshop:
- Visual Studio Code (code editor with Git integration)
Optional tools (with user prompts):
- Python 3.12 (for Module 08: Multiplayer Git)
- Windows Terminal (modern terminal experience)
The script checks for existing installations, shows clear progress, and verifies
each installation succeeded. At the end, it displays Git configuration instructions.
each installation succeeded. At the end, it clones the repository and can
open it in VSCode for immediate workshop access.
One-shot installation:
Invoke-RestMethod -Uri https://git.frod.dk/floppydiscen/git-workshop/raw/branch/main/install.ps1 | Invoke-Expression
.EXAMPLE
PS> .\install-prerequisites.ps1
PS> Invoke-RestMethod -Uri https://git.frod.dk/floppydiscen/git-workshop/raw/branch/main/install.ps1 | Invoke-Expression
Runs the complete installation and setup in one command.
.EXAMPLE
PS> .\install.ps1
Runs the installation script with interactive prompts.
.NOTES
@@ -245,7 +252,7 @@ Write-Host " • Git 2.23+ (version control system)" -ForegroundColor White
Write-Host " • Visual Studio Code (code editor)" -ForegroundColor White
Write-Host ""
Write-Host "You will be prompted for optional tools:" -ForegroundColor White
Write-Host " • Python 3.12 (for Module 08: Multiplayer Git)" -ForegroundColor White
Write-Host " • Windows Terminal (modern terminal experience)" -ForegroundColor White
Write-Host ""
@@ -266,7 +273,6 @@ $results = @{
VSCode = $false
VSCodeExtensions = $false
VSCodePowerShellIntegration = $null # null = not asked, true = configured, false = skipped/failed
Python = $null # null = not attempted, true = success, false = failed
WindowsTerminal = $null
}
@@ -448,20 +454,7 @@ Write-Progress -Activity "Installing Required Tools" -Completed
#region Optional Installations
# Python 3.12 (optional)
Write-Host ""
if (Get-UserConfirmation "Do you want to install Python 3.12? (Required for Module 08: Multiplayer Git)") {
Write-ProgressIndicator -Activity "Installing Optional Tools" -Status "Installing Python 3.12" -PercentComplete 50
$results.Python = Install-Package `
-Name "Python 3.12" `
-WingetId "Python.Python.3.12" `
-CheckCommand "python"
Write-Progress -Activity "Installing Optional Tools" -Completed
}
else {
Write-Host " Skipping Python installation." -ForegroundColor Gray
$results.Python = $null
}
# Windows Terminal (optional)
Write-Host ""
@@ -524,23 +517,9 @@ else {
Write-Error "Visual Studio Code - Installation failed or needs restart"
}
if ($results.Python -ne $null) {
Write-Host ""
Write-Host "Optional Tools:" -ForegroundColor White
if ($results.Python) {
Write-Success "Python 3.12"
}
else {
Write-Error "Python 3.12 - Installation failed or needs restart"
}
}
if ($results.WindowsTerminal -ne $null) {
if ($results.Python -eq $null) {
Write-Host ""
Write-Host "Optional Tools:" -ForegroundColor White
}
if ($results.WindowsTerminal) {
Write-Success "Windows Terminal"
@@ -571,13 +550,10 @@ if ($allRequired) {
Write-Host " git config --global core.editor `"code --wait`"" -ForegroundColor White
Write-Host ""
Write-Host "Verify your installation:" -ForegroundColor Cyan
Write-Host " pwsh --version" -ForegroundColor White
Write-Host " git --version" -ForegroundColor White
Write-Host " code --version" -ForegroundColor White
if ($results.Python) {
Write-Host " python --version" -ForegroundColor White
}
Write-Host "Verify your installation:" -ForegroundColor Cyan
Write-Host " pwsh --version" -ForegroundColor White
Write-Host " git --version" -ForegroundColor White
Write-Host " code --version" -ForegroundColor White
Write-Host ""
Write-Host "Set PowerShell execution policy (if needed):" -ForegroundColor Cyan
@@ -585,8 +561,6 @@ if ($allRequired) {
Write-Host ""
Write-Host "Recommended VS Code Extensions:" -ForegroundColor Cyan
Write-Host " • GitLens - Supercharge Git capabilities" -ForegroundColor White
Write-Host " • Git Graph - View Git history visually" -ForegroundColor White
Write-Host " • PowerShell - Better PowerShell support (from Microsoft)" -ForegroundColor White
Write-Host ""
Write-Host " Install via: Ctrl+Shift+X in VS Code" -ForegroundColor Gray
@@ -672,7 +646,7 @@ else {
Write-Host ""
Write-Host "Troubleshooting steps:" -ForegroundColor Yellow
Write-Host " 1. Close and reopen your terminal (or restart your computer)" -ForegroundColor White
Write-Host " 2. Run this script again: .\install-prerequisites.ps1" -ForegroundColor White
Write-Host " 2. Run this script again: .\install.ps1" -ForegroundColor White
Write-Host " 3. If issues persist, try manual installation:" -ForegroundColor White
Write-Host " See INSTALLATION.md for detailed instructions" -ForegroundColor White
Write-Host ""