add arch to installer script (#158)

This commit is contained in:
Dmitry Shibanov 2023-11-08 09:43:29 +01:00 committed by GitHub
parent 9d10c5b01a
commit a798c8ed46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -54,7 +54,7 @@ class NixNodeBuilder : NodeBuilder {
$installationTemplateLocation = Join-Path -Path $this.InstallationTemplatesLocation -ChildPath $this.InstallationTemplateName $installationTemplateLocation = Join-Path -Path $this.InstallationTemplatesLocation -ChildPath $this.InstallationTemplateName
$installationTemplateContent = Get-Content -Path $installationTemplateLocation -Raw $installationTemplateContent = Get-Content -Path $installationTemplateLocation -Raw
$installationTemplateContent = $installationTemplateContent -f $this.Version.ToString(3) $installationTemplateContent = $installationTemplateContent -f $this.Version.ToString(3), $this.Architecture
$installationTemplateContent | Out-File -FilePath $installationScriptLocation $installationTemplateContent | Out-File -FilePath $installationScriptLocation
Write-Debug "Done; Installation script location: $installationScriptLocation)" Write-Debug "Done; Installation script location: $installationScriptLocation)"

View File

@ -1,10 +1,11 @@
set -e set -e
NODE_VERSION={0} NODE_VERSION={0}
ARCH={1}
NODE_TOOLCACHE_PATH=$AGENT_TOOLSDIRECTORY/node NODE_TOOLCACHE_PATH=$AGENT_TOOLSDIRECTORY/node
NODE_TOOLCACHE_VERSION_PATH=$NODE_TOOLCACHE_PATH/$NODE_VERSION NODE_TOOLCACHE_VERSION_PATH=$NODE_TOOLCACHE_PATH/$NODE_VERSION
NODE_TOOLCACHE_VERSION_ARCH_PATH=$NODE_TOOLCACHE_VERSION_PATH/x64 NODE_TOOLCACHE_VERSION_ARCH_PATH=$NODE_TOOLCACHE_VERSION_PATH/$ARCH
echo "Check if Node.js hostedtoolcache folder exist..." echo "Check if Node.js hostedtoolcache folder exist..."
if [ ! -d $NODE_TOOLCACHE_PATH ]; then if [ ! -d $NODE_TOOLCACHE_PATH ]; then
@ -22,4 +23,4 @@ cp -R ./* $NODE_TOOLCACHE_VERSION_ARCH_PATH
rm $NODE_TOOLCACHE_VERSION_ARCH_PATH/setup.sh rm $NODE_TOOLCACHE_VERSION_ARCH_PATH/setup.sh
echo "Create complete file" echo "Create complete file"
touch $NODE_TOOLCACHE_VERSION_PATH/x64.complete touch $NODE_TOOLCACHE_VERSION_PATH/$ARCH.complete