Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Provisioning kit for Windows 10/11 + WSL2 Ubuntu dev machines. Bash + PowerShell
- **Supply chain**: pinned version + in-repo SHA256 where upstream artifacts are stable (Go, nvm installer — use these as the model). Checksum mismatch = hard fail; network failure = `log_warn` and continue.
- **Windows stays clean**: never install dev runtimes on the Windows host.
- **verify-setup.sh is read-only** and its check count (52) is quoted in README + docs — update all three together if you add checks.
- Version numbers live in `CHANGELOG.md` only — no version strings in script headers or banners.
- Version numbers live in `CHANGELOG.md` and git tags only — never hardcode a version in a script header or banner. Banners show the runtime `git describe --tags` result (empty for ZIP copies), so they can't drift.

## Conventions

Expand Down
13 changes: 12 additions & 1 deletion windows/stage0-winget.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,21 @@ function Install-NerdFont {
}
}

# Release version = latest git tag when run from a clone; empty for ZIP
# downloads (no .git) or when git is missing. History: CHANGELOG.md / tags.
$DevkitVersion = ""
try {
$tag = git -C $PSScriptRoot describe --tags 2>$null
if ($LASTEXITCODE -eq 0 -and $tag) { $DevkitVersion = " $tag" }
} catch { }
# git exits 128 when there's no repo/tags; don't let that leak as the script's
# exit code (CI's shell wrapper ends with `exit $LASTEXITCODE`)
$global:LASTEXITCODE = 0

try {
Clear-Host
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " Windows App Bootstrap (winget)" -ForegroundColor Cyan
Write-Host " Windows App Bootstrap (winget)$DevkitVersion" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan

# ----- winget must exist AND actually run -----
Expand Down
13 changes: 12 additions & 1 deletion windows/stage1-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ function Write-Err {
Write-Host " [X] $Message" -ForegroundColor Red
}

# Release version = latest git tag when run from a clone; empty for ZIP
# downloads (no .git) or when git is missing. History: CHANGELOG.md / tags.
$DevkitVersion = ""
try {
$tag = git -C $PSScriptRoot describe --tags 2>$null
if ($LASTEXITCODE -eq 0 -and $tag) { $DevkitVersion = " $tag" }
} catch { }
# git exits 128 when there's no repo/tags; don't let that leak as the script's
# exit code (CI's shell wrapper ends with `exit $LASTEXITCODE`)
$global:LASTEXITCODE = 0

try {

# ===========================================
Expand All @@ -67,7 +78,7 @@ try {
Clear-Host
Write-Host ""
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " WSL2 Development Environment" -ForegroundColor Cyan
Write-Host " WSL2 Development Environment$DevkitVersion" -ForegroundColor Cyan
Write-Host " Stage 1: Windows Configuration" -ForegroundColor Cyan
Write-Host " Supports: Windows 10 (2004+) & Windows 11" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan
Expand Down
13 changes: 12 additions & 1 deletion windows/stage3-vscode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,24 @@ function Write-Success { param([string]$Message); Write-Host " [OK] $Message"
function Write-Warn { param([string]$Message); Write-Host " [!] $Message" -ForegroundColor Yellow }
function Write-Err { param([string]$Message); Write-Host " [X] $Message" -ForegroundColor Red }

# Release version = latest git tag when run from a clone; empty for ZIP
# downloads (no .git) or when git is missing. History: CHANGELOG.md / tags.
$DevkitVersion = ""
try {
$tag = git -C $PSScriptRoot describe --tags 2>$null
if ($LASTEXITCODE -eq 0 -and $tag) { $DevkitVersion = " $tag" }
} catch { }
# git exits 128 when there's no repo/tags; don't let that leak as the script's
# exit code (CI's shell wrapper ends with `exit $LASTEXITCODE`)
$global:LASTEXITCODE = 0

# ===========================================
# Header
# ===========================================
Clear-Host
Write-Host ""
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " VSCode/Cursor Configuration" -ForegroundColor Cyan
Write-Host " VSCode/Cursor Configuration$DevkitVersion" -ForegroundColor Cyan
Write-Host " Stage 3: Extensions & Settings" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan

Expand Down
13 changes: 12 additions & 1 deletion windows/wsl-tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ param(

$ErrorActionPreference = "Stop"

# Release version = latest git tag when run from a clone; empty for ZIP
# downloads (no .git) or when git is missing. History: CHANGELOG.md / tags.
$DevkitVersion = ""
try {
$tag = git -C $PSScriptRoot describe --tags 2>$null
if ($LASTEXITCODE -eq 0 -and $tag) { $DevkitVersion = " $tag" }
} catch { }
# git exits 128 when there's no repo/tags; don't let that leak as the script's
# exit code (CI's shell wrapper ends with `exit $LASTEXITCODE`)
$global:LASTEXITCODE = 0

# wsl.exe's OWN subcommands (--list/--version/--status) emit UTF-16 (LE) with
# embedded nulls. Do NOT force [Console]::OutputEncoding globally: that would also
# mangle the UTF-8 passthrough from 'wsl -- <linux cmd>' (e.g. apt output, which
Expand Down Expand Up @@ -84,7 +95,7 @@ function Show-Header {
Clear-Host
Write-Host ""
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " WSL Management Tools" -ForegroundColor Cyan
Write-Host " WSL Management Tools$DevkitVersion" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan
}

Expand Down
6 changes: 5 additions & 1 deletion wsl/stage2-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ pause_enter() { $NONINTERACTIVE || read -r -p "$1" _ || true; }
# ===========================================
# Header
# ===========================================
# Release version = latest git tag when run from a clone; empty when the
# script was copied standalone. History: CHANGELOG.md / release tags.
DEVKIT_VERSION=$(git -C "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" describe --tags 2>/dev/null || true)

clear || true # don't let a missing TTY (piped/CI run) abort under 'set -e'
echo ""
echo -e "${CYAN}==========================================${NC}"
echo -e "${CYAN} Ubuntu Development Environment${NC}"
echo -e "${CYAN} Ubuntu Development Environment${DEVKIT_VERSION:+ $DEVKIT_VERSION}${NC}"
echo -e "${CYAN}==========================================${NC}"
echo ""

Expand Down