Skip to content

Commit dae06b3

Browse files
committed
chore(version): change cli version
1 parent f03f6cb commit dae06b3

7 files changed

Lines changed: 24 additions & 15 deletions

File tree

Gopkg.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/builds.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func (d *DryccCmd) BuildsList(appID string, results int) error {
3535
}
3636

3737
// BuildsCreate creates a build for an app.
38-
func (d *DryccCmd) BuildsCreate(appID, image, procfile string) error {
38+
func (d *DryccCmd) BuildsCreate(appID, image, stack, procfile string) error {
3939
s, appID, err := load(d.ConfigFile, appID)
4040

4141
if err != nil {
@@ -61,7 +61,7 @@ func (d *DryccCmd) BuildsCreate(appID, image, procfile string) error {
6161

6262
d.Print("Creating build... ")
6363
quit := progress(d.WOut)
64-
_, err = builds.New(s.Client, appID, image, procfileMap)
64+
_, err = builds.New(s.Client, appID, image, stack, procfileMap)
6565
quit <- true
6666
<-quit
6767
if d.checkAPICompatibility(s.Client, err) != nil {

cmd/builds_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,21 @@ func TestBuildsCreate(t *testing.T) {
139139
testutil.SetHeaders(w)
140140
testutil.AssertBody(t, api.CreateBuildRequest{
141141
Image: "ncc/1701:A",
142+
Stack: "container",
142143
}, r)
143144
w.WriteHeader(http.StatusCreated)
144145
fmt.Fprintf(w, "{}")
145146
})
146147

147-
err = cmdr.BuildsCreate("enterprise", "ncc/1701:A", "")
148+
err = cmdr.BuildsCreate("enterprise", "ncc/1701:A", "container", "")
148149
assert.NoErr(t, err)
149150
assert.Equal(t, testutil.StripProgress(b.String()), "Creating build... done\n", "output")
150151

151152
server.Mux.HandleFunc("/v2/apps/bradbury/builds/", func(w http.ResponseWriter, r *http.Request) {
152153
testutil.SetHeaders(w)
153154
testutil.AssertBody(t, api.CreateBuildRequest{
154155
Image: "nx/72307:latest",
156+
Stack: "container",
155157
Procfile: map[string]string{
156158
"web": "./drive",
157159
"warp": "./warp 8",
@@ -163,7 +165,7 @@ func TestBuildsCreate(t *testing.T) {
163165
})
164166
b.Reset()
165167

166-
err = cmdr.BuildsCreate("bradbury", "nx/72307:latest", `web: ./drive
168+
err = cmdr.BuildsCreate("bradbury", "nx/72307:latest", "container", `web: ./drive
167169
warp: ./warp 8
168170
`)
169171
assert.NoErr(t, err)
@@ -173,6 +175,7 @@ warp: ./warp 8
173175
testutil.SetHeaders(w)
174176
testutil.AssertBody(t, api.CreateBuildRequest{
175177
Image: "nx/326:latest",
178+
Stack: "container",
176179
Procfile: map[string]string{
177180
"web": "./drive",
178181
"warp": "./warp 8",
@@ -189,7 +192,7 @@ warp: ./warp 8
189192
`), os.ModePerm)
190193
assert.NoErr(t, err)
191194

192-
err = cmdr.BuildsCreate("franklin", "nx/326:latest", "")
195+
err = cmdr.BuildsCreate("franklin", "nx/326:latest", "container", "")
193196
assert.NoErr(t, err)
194197
assert.Equal(t, testutil.StripProgress(b.String()), "Creating build... done\n", "output")
195198

cmd/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type Commander interface {
2929
Whoami(bool) error
3030
Regenerate(string, bool) error
3131
BuildsList(string, int) error
32-
BuildsCreate(string, string, string) error
32+
BuildsCreate(string, string, string, string) error
3333
CertsList(int, time.Time) error
3434
CertAdd(string, string, string) error
3535
CertRemove(string) error

parser/builds.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Arguments:
8181
Options:
8282
-a --app=<app>
8383
The uniquely identifiable name for the application.
84+
-s --stack=<stack>
85+
The stack name for the application, defaults to container.
8486
-p --procfile=<procfile>
8587
A YAML string used to supply a Procfile to the application.
8688
`
@@ -93,7 +95,11 @@ Options:
9395

9496
app := safeGetValue(args, "--app")
9597
image := safeGetValue(args, "<image>")
98+
stack := safeGetValue(args, "--stack")
99+
if stack == "" {
100+
stack = "container"
101+
}
96102
procfile := safeGetValue(args, "--procfile")
97103

98-
return cmdr.BuildsCreate(app, image, procfile)
104+
return cmdr.BuildsCreate(app, image, stack, procfile)
99105
}

parser/builds_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func (d FakeDryccCmd) BuildsList(string, int) error {
1313
return errors.New("builds:list")
1414
}
1515

16-
func (d FakeDryccCmd) BuildsCreate(string, string, string) error {
16+
func (d FakeDryccCmd) BuildsCreate(string, string, string, string) error {
1717
return errors.New("builds:create")
1818
}
1919

version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package version
22

33
// Version identifies the Drycc product revision.
44
// Note: This value is overwritten by the linker during build
5-
var Version = "v1.0.2"
5+
var Version = "v1.1.0"

0 commit comments

Comments
 (0)