Skip to content

Commit

Permalink
Bump default lifecycle version to v0.2.1
Browse files Browse the repository at this point in the history
Signed-off-by: Emily Casey <ecasey@pivotal.io>
  • Loading branch information
ekcasey committed May 30, 2019
1 parent 6ef6114 commit 61ee7f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lifecycle/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

const (
DefaultLifecycleVersion = "0.2.0"
DefaultLifecycleVersion = "0.2.1"
)

//go:generate mockgen -package mocks -destination mocks/downloader.go github.com/buildpack/pack/lifecycle Downloader
Expand Down
9 changes: 5 additions & 4 deletions lifecycle/fetcher_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package lifecycle_test

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
Expand Down Expand Up @@ -80,12 +81,12 @@ func testFetcher(t *testing.T, when spec.G, it spec.S) {
when("neither is uri nor version is provided", func() {
it("returns the default lifecycle", func() {
mockDownloader.EXPECT().
Download("https://github.com/buildpack/lifecycle/releases/download/v0.2.0/lifecycle-v0.2.0+linux.x86-64.tgz").
Download(fmt.Sprintf("https://github.com/buildpack/lifecycle/releases/download/v%s/lifecycle-v%s+linux.x86-64.tgz", lifecycle.DefaultLifecycleVersion, lifecycle.DefaultLifecycleVersion)).
Return(filepath.Join("testdata", "download-dir"), nil)

md, err := subject.Fetch(nil, "")
h.AssertNil(t, err)
h.AssertEq(t, md.Version.String(), "0.2.0")
h.AssertEq(t, md.Version.String(), lifecycle.DefaultLifecycleVersion)
h.AssertEq(t, md.Dir, filepath.Join("testdata", "download-dir", "fake-lifecycle"))
})
})
Expand All @@ -97,7 +98,7 @@ func testFetcher(t *testing.T, when spec.G, it spec.S) {
defer os.RemoveAll(tmp)

mockDownloader.EXPECT().
Download("https://github.com/buildpack/lifecycle/releases/download/v0.2.0/lifecycle-v0.2.0+linux.x86-64.tgz").
Download(fmt.Sprintf("https://github.com/buildpack/lifecycle/releases/download/v%s/lifecycle-v%s+linux.x86-64.tgz", lifecycle.DefaultLifecycleVersion, lifecycle.DefaultLifecycleVersion)).
Return(tmp, nil)

_, err = subject.Fetch(nil, "")
Expand All @@ -116,7 +117,7 @@ func testFetcher(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, ioutil.WriteFile(filepath.Join(tmp, "builder"), []byte("content"), os.ModePerm))

mockDownloader.EXPECT().
Download("https://github.com/buildpack/lifecycle/releases/download/v0.2.0/lifecycle-v0.2.0+linux.x86-64.tgz").
Download(fmt.Sprintf("https://github.com/buildpack/lifecycle/releases/download/v%s/lifecycle-v%s+linux.x86-64.tgz", lifecycle.DefaultLifecycleVersion, lifecycle.DefaultLifecycleVersion)).
Return(tmp, nil)

_, err = subject.Fetch(nil, "")
Expand Down

0 comments on commit 61ee7f0

Please sign in to comment.