add architecture to installer script (#91)

This commit is contained in:
Dmitry Shibanov 2023-11-08 13:05:51 +01:00 committed by GitHub
parent efc7cf9b98
commit 6de71f133a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -44,7 +44,7 @@ class NixGoBuilder : GoBuilder {
$installationTemplateLocation = Join-Path -Path $this.InstallationTemplatesLocation -ChildPath $this.InstallationTemplateName
$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
Write-Debug "Done; Installation script location: $installationScriptLocation)"

View file

@ -1,10 +1,11 @@
set -e
GO_VERSION={0}
ARCH={1}
GO_TOOLCACHE_PATH=$AGENT_TOOLSDIRECTORY/go
GO_TOOLCACHE_VERSION_PATH=$GO_TOOLCACHE_PATH/$GO_VERSION
GO_TOOLCACHE_VERSION_ARCH_PATH=$GO_TOOLCACHE_VERSION_PATH/x64
GO_TOOLCACHE_VERSION_ARCH_PATH=$GO_TOOLCACHE_VERSION_PATH/$ARCH
echo "Check if Go hostedtoolcache folder exist..."
if [ ! -d $GO_TOOLCACHE_PATH ]; then
@ -22,4 +23,4 @@ cp -R ./* $GO_TOOLCACHE_VERSION_ARCH_PATH
rm $GO_TOOLCACHE_VERSION_ARCH_PATH/setup.sh
echo "Create complete file"
touch $GO_TOOLCACHE_VERSION_PATH/x64.complete
touch $GO_TOOLCACHE_VERSION_PATH/$ARCH.complete