diff --git a/builders/build-node.ps1 b/builders/build-node.ps1 index 2f664e7..7213bd7 100644 --- a/builders/build-node.ps1 +++ b/builders/build-node.ps1 @@ -28,14 +28,6 @@ param( Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "nix-helpers.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "win-helpers.psm1") -DisableNameChecking -function Create-ArtifactDirectories { - $env:BINARIES_DIRECTORY = Join-Path $env:RUNNER_TEMP "binaries" - New-Item -Path $env:BINARIES_DIRECTORY -ItemType "directory" - - $env:ARTIFACT_DIRECTORY = Join-Path $env:RUNNER_TEMP "artifact" - New-Item -Path $env:ARTIFACT_DIRECTORY -ItemType "directory" -} - function Get-NodeBuilder { <# .SYNOPSIS @@ -74,8 +66,6 @@ function Get-NodeBuilder { return $builder } -Create-ArtifactDirectories - ### Create Node.js builder instance, and build artifact $Builder = Get-NodeBuilder -Version $Version -Platform $Platform -Architecture $Architecture $Builder.Build() diff --git a/builders/node-builder.psm1 b/builders/node-builder.psm1 index a56a84b..f0eefa3 100644 --- a/builders/node-builder.psm1 +++ b/builders/node-builder.psm1 @@ -19,10 +19,10 @@ class NodeBuilder { The location of temporary files that will be used during Node.js package generation. .PARAMETER WorkFolderLocation - The location of installation files. Using environment BINARIES_DIRECTORY variable value. + The location of installation files. .PARAMETER ArtifactFolderLocation - The location of generated Node.js artifact. Using environment ARTIFACT_DIRECTORY variable value. + The location of generated Node.js artifact. .PARAMETER InstallationTemplatesLocation The location of installation script template. Using "installers" folder from current repository. @@ -43,9 +43,8 @@ class NodeBuilder { $this.Architecture = $architecture $this.TempFolderLocation = [IO.Path]::GetTempPath() - $this.WorkFolderLocation = $env:BINARIES_DIRECTORY - $this.ArtifactFolderLocation = $env:ARTIFACT_DIRECTORY - + $this.WorkFolderLocation = Join-Path $env:RUNNER_TEMP "binaries" + $this.ArtifactFolderLocation = Join-Path $env:RUNNER_TEMP "artifact" $this.InstallationTemplatesLocation = Join-Path -Path $PSScriptRoot -ChildPath "../installers" } @@ -87,6 +86,10 @@ class NodeBuilder { Generates Node.js artifact from downloaded binaries. #> + Write-Host "Create WorkFolderLocation and ArtifactFolderLocation folders" + New-Item -Path $this.WorkFolderLocation -ItemType "directory" + New-Item -Path $this.ArtifactFolderLocation -ItemType "directory" + Write-Host "Download Node.js $($this.Version) [$($this.Architecture)] executable..." $binariesArchivePath = $this.Download()