Skip to content

Commit

Permalink
Add support for hwc buildback
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-dt committed Sep 5, 2024
1 parent a89cd98 commit 90b4835
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"os"
"path/filepath"
"regexp"
"slices"
"strings"
"time"

Expand Down Expand Up @@ -338,7 +339,16 @@ func (h *Hook) getDownloadURL(c *credentials) string {
return ""
}

u, err := url.ParseRequestURI(fmt.Sprintf("%s/v1/deployment/installer/agent/unix/paas-sh/latest", apiURL))
osType := "unix"
installerType := "paas-sh"

// use windows deployment for Hosted Web Core
if slices.Contains(h.IncludeTechnologies, "hwc") {
osType = "windows"
installerType = "default"
}

u, err := url.ParseRequestURI(fmt.Sprintf("%s/v1/deployment/installer/agent/%s/%s/latest", apiURL, osType, installerType))
if err != nil {
return ""
}
Expand Down

0 comments on commit 90b4835

Please sign in to comment.