mirror of
https://github.com/actions/node-versions.git
synced 2025-04-19 10:13:29 +00:00
www
This commit is contained in:
parent
55879a19a1
commit
239f218602
@ -11,6 +11,5 @@ function Extract-7ZipArchive {
|
||||
)
|
||||
|
||||
Write-Debug "Extract $ArchivePath to $OutputDirectory"
|
||||
Write-Host "7z x $ArchivePath -o$OutputDirectory"
|
||||
7z x $ArchivePath -o$OutputDirectory
|
||||
7z.exe x $ArchivePath -o"$OutputDirectory" -y
|
||||
}
|
@ -18,7 +18,7 @@ echo "Create Node.js $NODE_VERSION folder"
|
||||
mkdir -p $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
||||
|
||||
echo "Copy Node.js binaries to hostedtoolcache folder"
|
||||
cp ./* $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
||||
cp -R ./* $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
||||
rm $NODE_TOOLCACHE_VERSION_ARCH_PATH/setup.sh
|
||||
|
||||
ls $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
||||
|
@ -1,4 +1,5 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
[Version]$Version = "{{__VERSION__}}"
|
||||
[string]$Architecture = "{{__ARCHITECTURE__}}"
|
||||
$ArchiveFileName = "tool.7z"
|
||||
@ -29,16 +30,10 @@ if (-not (Test-Path $NodeToolcacheArchitecturePath)) {
|
||||
}
|
||||
|
||||
Write-Host "Copy Node.js binaries to hostedtoolcache folder"
|
||||
Copy-Item -Path $ArchiveFileName -Destination $NodeToolcacheArchitecturePath
|
||||
Copy-Item -Path * -Destination $NodeToolcacheArchitecturePath
|
||||
Remove-Item $NodeToolcacheArchitecturePath\setup.ps1 -Force | Out-Null
|
||||
|
||||
Set-Location $NodeToolcacheArchitecturePath
|
||||
Write-Host "Unzip Node.js to $NodeToolcacheArchitecturePath"
|
||||
7z.exe x $ArchiveFileName -o"$TempDirectory" -y | Out-Null
|
||||
$NodeInnerFolder = Get-Item -Path "$TempDirectory\node-*" | Select-Object -First 1
|
||||
Get-ChildItem $NodeInnerFolder | Move-Item -Destination $NodeToolcacheArchitecturePath
|
||||
Write-Host "Node.js unzipped successfully"
|
||||
|
||||
Remove-Item $ArchiveFileName -Force | Out-Null
|
||||
Get-ChildItem $NodeToolcacheArchitecturePath
|
||||
|
||||
Write-Host "Create complete file"
|
||||
New-Item -ItemType File -Path $NodeToolcacheVersionPath -Name "$Architecture.complete" | Out-Null
|
Loading…
Reference in New Issue
Block a user