Skip to content

Commit

Permalink
add architecture to installer script (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-shibanov authored Nov 8, 2023
1 parent efc7cf9 commit 6de71f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion builders/nix-go-builder.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
5 changes: 3 additions & 2 deletions installers/nix-setup-template.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 6de71f1

Please sign in to comment.