Skip to content

Commit

Permalink
Merge pull request #51 from Ensono/fix/publish-binaries
Browse files Browse the repository at this point in the history
Fixed issue publoshing binaries
  • Loading branch information
ElvenSpellmaker authored Nov 19, 2024
2 parents ef603a6 + 5589609 commit c485888
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions build/scripts/Invoke-Compile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ param (

[string[]]
# architecture that should be targeted
$arch = @("amd64")
$arch = @("amd64"),

[switch]
# specify if the VCS status should be built into the go binaries
$NoVCS
)

# If the base directory does not exist, create it
Expand All @@ -35,9 +39,15 @@ if (!(Test-Path -Path $BasePath)) {
$cmd = "go get"
Invoke-Expression -Command $cmd

# Set up the go build argument for vcs
$build_vcs = ""
if ($NoVCS.IsPresent) {
$build_vcs = "-buildvcs=false"
}

# iterate around each of the target os
foreach ($os in $targets) {

# get a list of the architectures to build for this OS
$archs = $arch

Expand Down Expand Up @@ -76,9 +86,10 @@ foreach ($os in $targets) {
Write-Output ("Building for '{0}' ({1})" -f $os, $_arch)

# Build up the command to create the CLI binary
$cmd = 'go build -ldflags "-X github.com/Ensono/stacks-cli/cmd.version={0}" -o {1}' -f
$cmd = 'go build -ldflags "-X github.com/Ensono/stacks-cli/cmd.version={0}" -o {1} {2}' -f
$BuildNumber,
$cli_filename
$cli_filename,
$build_vcs

Invoke-Expression -Command $cmd

Expand All @@ -93,6 +104,3 @@ foreach ($os in $targets) {

}
}



2 changes: 1 addition & 1 deletion build/taskctl/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tasks:
description: Compile CLI and Integration Tests
context: buildenv
command:
- /app/build/scripts/Invoke-Compile.ps1 -BuildNumber $BUILDNUMBER
- /app/build/scripts/Invoke-Compile.ps1 -BuildNumber $BUILDNUMBER -NoVCS

_docs:
description: Build Docs for Stacks CLI
Expand Down

0 comments on commit c485888

Please sign in to comment.