mirror of
https://github.com/actions/node-versions.git
synced 2025-04-20 02:43:49 +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-Debug "Extract $ArchivePath to $OutputDirectory"
|
||||||
Write-Host "7z x $ArchivePath -o$OutputDirectory"
|
7z.exe x $ArchivePath -o"$OutputDirectory" -y
|
||||||
7z x $ArchivePath -o$OutputDirectory
|
|
||||||
}
|
}
|
@ -18,7 +18,7 @@ echo "Create Node.js $NODE_VERSION folder"
|
|||||||
mkdir -p $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
mkdir -p $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
||||||
|
|
||||||
echo "Copy Node.js binaries to hostedtoolcache folder"
|
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
|
rm $NODE_TOOLCACHE_VERSION_ARCH_PATH/setup.sh
|
||||||
|
|
||||||
ls $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
ls $NODE_TOOLCACHE_VERSION_ARCH_PATH
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
[Version]$Version = "{{__VERSION__}}"
|
[Version]$Version = "{{__VERSION__}}"
|
||||||
[string]$Architecture = "{{__ARCHITECTURE__}}"
|
[string]$Architecture = "{{__ARCHITECTURE__}}"
|
||||||
$ArchiveFileName = "tool.7z"
|
$ArchiveFileName = "tool.7z"
|
||||||
@ -29,16 +30,10 @@ if (-not (Test-Path $NodeToolcacheArchitecturePath)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Copy Node.js binaries to hostedtoolcache folder"
|
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
|
Get-ChildItem $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
|
|
||||||
|
|
||||||
Write-Host "Create complete file"
|
Write-Host "Create complete file"
|
||||||
New-Item -ItemType File -Path $NodeToolcacheVersionPath -Name "$Architecture.complete" | Out-Null
|
New-Item -ItemType File -Path $NodeToolcacheVersionPath -Name "$Architecture.complete" | Out-Null
|
Loading…
Reference in New Issue
Block a user