Skip to content

Commit 58e94d3

Browse files
authored
Merge pull request #3734 from ActiveState/CP-1101
Don't include state-mcp in public releases
2 parents 10b9cc4 + d1a16cb commit 58e94d3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

internal/constants/constants.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ const BetaChannel = "beta"
225225
// ExperimentalChannel is the channel used for experimental builds
226226
const ExperimentalChannel = "master"
227227

228+
// PublicChannels are the channels intended for public consumption -- comma separated because Go doesn't allow slice constants
229+
const PublicChannels = ReleaseChannel + "," + BetaChannel
230+
228231
// MonoAPIPath is the api path used for the platform api
229232
const MonoAPIPath = "/api/v1"
230233

scripts/ci/payload-generator/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ import (
66
"fmt"
77
"os"
88
"path/filepath"
9+
"strings"
910

1011
"github.com/ActiveState/cli/internal/constants"
1112
"github.com/ActiveState/cli/internal/environment"
1213
"github.com/ActiveState/cli/internal/fileutils"
1314
"github.com/ActiveState/cli/internal/installation"
1415
"github.com/ActiveState/cli/internal/osutils"
16+
"github.com/ActiveState/cli/internal/sliceutils"
1517
)
1618

1719
var (
@@ -71,8 +73,11 @@ func generatePayload(inDir, outDir, binDir, channel, version string) error {
7173
filepath.Join(inDir, constants.StateCmd+osutils.ExeExtension): binDir,
7274
filepath.Join(inDir, constants.StateSvcCmd+osutils.ExeExtension): binDir,
7375
filepath.Join(inDir, constants.StateExecutorCmd+osutils.ExeExtension): binDir,
74-
filepath.Join(inDir, constants.StateMCPCmd+osutils.ExeExtension): binDir,
7576
}
77+
if !sliceutils.Contains(strings.Split(constants.PublicChannels, ","), channel) {
78+
files[filepath.Join(inDir, constants.StateMCPCmd+osutils.ExeExtension)] = binDir
79+
}
80+
7681
if err := copyFiles(files); err != nil {
7782
return fmt.Errorf(emsg, err)
7883
}

0 commit comments

Comments
 (0)