Skip to content

Commit 31d3e5a

Browse files
committed
Changes based on PR feedback:
- always update test/e2e/assets/chart/zz_chart.go - simplify sed command Signed-off-by: John Hunkins <[email protected]>
1 parent b256bcc commit 31d3e5a

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ e2e-local: bin/e2e-local.test test/e2e-local.image.tar
143143
$(GINKGO) -nodes $(or $(NODES),1) -flakeAttempts 3 -randomizeAllSpecs $(if $(TEST),-focus '$(TEST)') -v -timeout 90m $< -- -namespace=operators -olmNamespace=operator-lifecycle-manager -dummyImage=bitnami/nginx:latest -kind.images=../test/e2e-local.image.tar
144144

145145
# this target updates the zz_chart.go file with files found in deploy/chart
146-
# will only fire if a file in deploy/chart has been changed
146+
# this will always fire since it has been marked as phony
147+
.PHONY: test/e2e/assets/chart/zz_chart.go
147148
test/e2e/assets/chart/zz_chart.go: $(shell find deploy/chart -type f)
148149
$(BINDATA) -o $@ -pkg chart -prefix deploy/chart/ $^
149150

scripts/package_release.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,8 @@ charttmpdir=${charttmpdir}/chart
1818

1919
cp -R deploy/chart/ "${charttmpdir}"
2020

21-
# A space character is needed for -i argument in mac BSD sed.
22-
# GNU sed has a --version argument, and BSD sed does not.
23-
# Check for both conditions to be safe for darwin users that override sed with gsed
24-
if [ -z "${OSTYPE##*"darwin"*}" ] && ! sed --version >/dev/null 2>&1; then
25-
SP=" "
26-
fi
27-
sed -i"${SP}"'' "s/^[Vv]ersion:.*\$/version: ${version}/" "${charttmpdir}/Chart.yaml"
21+
# overwrite the destination Chart.yaml file with a modified copy containing the version
22+
sed "s/^[Vv]ersion:.*\$/version: ${version}/" deploy/chart/Chart.yaml > "${charttmpdir}/Chart.yaml"
2823

2924
mkdir -p "${chartdir}"
3025

0 commit comments

Comments
 (0)