Skip to content

Commit 6de71f1

Browse files
add architecture to installer script (#91)
1 parent efc7cf9 commit 6de71f1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: builders/nix-go-builder.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class NixGoBuilder : GoBuilder {
4444
$installationTemplateLocation = Join-Path -Path $this.InstallationTemplatesLocation -ChildPath $this.InstallationTemplateName
4545

4646
$installationTemplateContent = Get-Content -Path $installationTemplateLocation -Raw
47-
$installationTemplateContent = $installationTemplateContent -f $this.Version.ToString(3)
47+
$installationTemplateContent = $installationTemplateContent -f $this.Version.ToString(3), $this.Architecture
4848
$installationTemplateContent | Out-File -FilePath $installationScriptLocation
4949

5050
Write-Debug "Done; Installation script location: $installationScriptLocation)"

Diff for: installers/nix-setup-template.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
set -e
22

33
GO_VERSION={0}
4+
ARCH={1}
45

56
GO_TOOLCACHE_PATH=$AGENT_TOOLSDIRECTORY/go
67
GO_TOOLCACHE_VERSION_PATH=$GO_TOOLCACHE_PATH/$GO_VERSION
7-
GO_TOOLCACHE_VERSION_ARCH_PATH=$GO_TOOLCACHE_VERSION_PATH/x64
8+
GO_TOOLCACHE_VERSION_ARCH_PATH=$GO_TOOLCACHE_VERSION_PATH/$ARCH
89

910
echo "Check if Go hostedtoolcache folder exist..."
1011
if [ ! -d $GO_TOOLCACHE_PATH ]; then
@@ -22,4 +23,4 @@ cp -R ./* $GO_TOOLCACHE_VERSION_ARCH_PATH
2223
rm $GO_TOOLCACHE_VERSION_ARCH_PATH/setup.sh
2324

2425
echo "Create complete file"
25-
touch $GO_TOOLCACHE_VERSION_PATH/x64.complete
26+
touch $GO_TOOLCACHE_VERSION_PATH/$ARCH.complete

0 commit comments

Comments
 (0)