Skip to content

Commit 2ea6ad0

Browse files
committed
Ensure we also restore ports
1 parent 33766ef commit 2ea6ad0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/bin/restore-from-native-gem.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ $gemToUnpack = "./tiny_tds-$gemVersion-$env:RUBY_ARCHITECTURE.gem"
44
Write-Host "Looking to unpack $gemToUnpack"
55
gem unpack --target ./tmp "$gemToUnpack"
66

7-
# Restore precompiled code
7+
# Restore precompiled code (Gem code)
88
$source = (Resolve-Path ".\tmp\tiny_tds-$gemVersion-$env:RUBY_ARCHITECTURE\lib\tiny_tds").Path
99
$destination = (Resolve-Path ".\lib\tiny_tds").Path
1010
Get-ChildItem $source -Recurse -Exclude "*.rb" | Copy-Item -Destination {Join-Path $destination $_.FullName.Substring($source.length)}
11+
12+
# Restore precompiled code (ports)
13+
$source = (Resolve-Path ".\tmp\tiny_tds-$gemVersion-$env:RUBY_ARCHITECTURE\ports").Path
14+
New-Item -ItemType Directory -Path ".\ports" -Force
15+
$destination = (Resolve-Path ".\ports").Path
16+
Get-ChildItem $source -Recurse -Exclude "*.rb" | Copy-Item -Destination {Join-Path $destination $_.FullName.Substring($source.length)}

0 commit comments

Comments
 (0)