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 90b4835 commit 8c1ded7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"path/filepath"
"regexp"
"slices"
"runtime"
"strings"
"time"

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

osType := "unix"
installerType := "paas-sh"
if runtime.GOOS == "windows" {
u, err := url.ParseRequestURI(fmt.Sprintf("%s/v1/deployment/installer/agent/windows/defaukt/latest", apiURL))
if err != nil {
return ""
}

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

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

0 comments on commit 8c1ded7

Please sign in to comment.