From 69de4e514f1fa43da8d4965da92bf4b0183160f9 Mon Sep 17 00:00:00 2001 From: Forest Eckhardt Date: Tue, 9 Jul 2019 15:39:26 -0400 Subject: [PATCH] Remove buildpack.toml, in favor of buildpack.toml.tmpl - Use go templating (scripts/template.go) to construct the buildpack.toml when packaging/releasing cnbs - The CHANGELOG is deprecated, in favor of release notes - Use dagger.DeleteBuildpack to preserve built CNB in our release pipeline [#166793497] Co-authored-by: David Freilich --- .gitignore | 3 ++- buildpack.toml => buildpack.toml.tmpl | 2 +- integration/integration_test.go | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) rename buildpack.toml => buildpack.toml.tmpl (96%) diff --git a/.gitignore b/.gitignore index 477475c..4f4ffca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .bin/ *.tgz -bin/ +/bin/ dep-cnb_* +/buildpack.toml diff --git a/buildpack.toml b/buildpack.toml.tmpl similarity index 96% rename from buildpack.toml rename to buildpack.toml.tmpl index 00f7d69..81c7d99 100644 --- a/buildpack.toml +++ b/buildpack.toml.tmpl @@ -2,7 +2,7 @@ [buildpack] id = "org.cloudfoundry.dep-cnb" name = "Dep Buildpack" -version = "0.0.1" +version = "{{ .Version }}" [metadata] include_files = ["bin/build","bin/detect","buildpack.toml","go.mod","go.sum"] diff --git a/integration/integration_test.go b/integration/integration_test.go index 3682f81..7daa03d 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -1,11 +1,11 @@ package integration_test import ( - "github.com/cloudfoundry/dep-cnb/dep" - "os" "path/filepath" "testing" + "github.com/cloudfoundry/dep-cnb/dep" + "github.com/cloudfoundry/dagger" . "github.com/onsi/gomega" "github.com/sclevine/spec" @@ -24,11 +24,11 @@ func TestIntegration(t *testing.T) { depURI, err = dagger.PackageBuildpack(bpDir) Expect(err).NotTo(HaveOccurred()) - defer os.RemoveAll(depURI) + defer dagger.DeleteBuildpack(depURI) goURI, err = dagger.GetLatestBuildpack("go-cnb") Expect(err).NotTo(HaveOccurred()) - defer os.RemoveAll(goURI) + defer dagger.DeleteBuildpack(goURI) spec.Run(t, "Integration", testIntegration, spec.Report(report.Terminal{})) }