From 803f94a363ed3caf1ef0393a6c36215acd2163dc Mon Sep 17 00:00:00 2001 From: James Taylor Date: Tue, 30 Apr 2024 11:42:57 +0100 Subject: [PATCH] [WIP] Fix release for packages without indexes Resolves #115 Signed-off-by: James Taylor --- cmd/release/main_test.go | 2 +- cmd/release/testdata/buildwithindexes/image.json | 4 ++++ cmd/release/testdata/buildwithoutindexes/image.json | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 cmd/release/testdata/buildwithindexes/image.json create mode 100644 cmd/release/testdata/buildwithoutindexes/image.json diff --git a/cmd/release/main_test.go b/cmd/release/main_test.go index 7c776f4..540caac 100644 --- a/cmd/release/main_test.go +++ b/cmd/release/main_test.go @@ -25,7 +25,7 @@ var _ = Describe("Main", func() { Eventually(session).Should(gexec.Exit(expectedErrorCode)) }, Entry("When there is no chaincode metadata", 0, func() []string { - return []string{"BUILD_OUTPUT_DIR", "RELEASE_OUTPUT_DIR"} + return []string{"./testdata/buildwithoutindexes", "RELEASE_OUTPUT_DIR"} }), Entry("When there is chaincode metadata", 0, func() []string { return []string{"./testdata/buildwithindexes", tempDir} diff --git a/cmd/release/testdata/buildwithindexes/image.json b/cmd/release/testdata/buildwithindexes/image.json new file mode 100644 index 0000000..313f1e6 --- /dev/null +++ b/cmd/release/testdata/buildwithindexes/image.json @@ -0,0 +1,4 @@ +{ + "name": "ghcr.io/hyperledger/asset-transfer-basic", + "digest": "sha256:b35962f000d26ad046d4102f22d70a1351692fc69a9ddead89dfa13aefb942a7" +} diff --git a/cmd/release/testdata/buildwithoutindexes/image.json b/cmd/release/testdata/buildwithoutindexes/image.json new file mode 100644 index 0000000..313f1e6 --- /dev/null +++ b/cmd/release/testdata/buildwithoutindexes/image.json @@ -0,0 +1,4 @@ +{ + "name": "ghcr.io/hyperledger/asset-transfer-basic", + "digest": "sha256:b35962f000d26ad046d4102f22d70a1351692fc69a9ddead89dfa13aefb942a7" +}