Files
bun.sh/scripts/set-webkit-submodule-to-cmake.ps1
dave caruso aba37525a6 windows: fix bundler reliability and nuke WSL-based codegen scripts (#8890)
* bruh

* yeaaahhhhhhhhhhhhhhhhhhhhhhhhhhh

* revisions

* yeah

* fix

* make no codegen do less things
2024-02-13 20:33:24 -08:00

22 lines
771 B
PowerShell

# Navigate to the parent directory of the script
$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
Push-Location $scriptPath\..
try {
# Get the WEBKIT_TAG value from CMakeLists.txt
$WEBKIT_TAG = Select-String -Path 'CMakeLists.txt' -Pattern 'set\(WEBKIT_TAG (.*?)\)' | ForEach-Object { $_.Matches.Groups[1].Value }
if (-not $WEBKIT_TAG) {
Write-Host "Could not find WEBKIT_TAG in CMakeLists.txt"
exit 1
}
Write-Host "Setting WebKit submodule to $WEBKIT_TAG"
# Navigate to the WebKit submodule directory
Set-Location src/bun.js/WebKit
# Fetch and reset the submodule to the specified tag
git fetch origin "$WEBKIT_TAG"
git reset --hard "$WEBKIT_TAG"
} finally {
Pop-Location
}