Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ const BetaChannel = "beta"
// ExperimentalChannel is the channel used for experimental builds
const ExperimentalChannel = "master"

// PublicChannels are the channels intended for public consumption -- comma separated because Go doesn't allow slice constants
const PublicChannels = ReleaseChannel + "," + BetaChannel

// MonoAPIPath is the api path used for the platform api
const MonoAPIPath = "/api/v1"

Expand Down
7 changes: 6 additions & 1 deletion scripts/ci/payload-generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import (
"fmt"
"os"
"path/filepath"
"strings"

"github.com/ActiveState/cli/internal/constants"
"github.com/ActiveState/cli/internal/environment"
"github.com/ActiveState/cli/internal/fileutils"
"github.com/ActiveState/cli/internal/installation"
"github.com/ActiveState/cli/internal/osutils"
"github.com/ActiveState/cli/internal/sliceutils"
)

var (
Expand Down Expand Up @@ -71,8 +73,11 @@ func generatePayload(inDir, outDir, binDir, channel, version string) error {
filepath.Join(inDir, constants.StateCmd+osutils.ExeExtension): binDir,
filepath.Join(inDir, constants.StateSvcCmd+osutils.ExeExtension): binDir,
filepath.Join(inDir, constants.StateExecutorCmd+osutils.ExeExtension): binDir,
filepath.Join(inDir, constants.StateMCPCmd+osutils.ExeExtension): binDir,
}
if !sliceutils.Contains(strings.Split(constants.PublicChannels, ","), channel) {
files[filepath.Join(inDir, constants.StateMCPCmd+osutils.ExeExtension)] = binDir
}

if err := copyFiles(files); err != nil {
return fmt.Errorf(emsg, err)
}
Expand Down
Loading