fix incorrect wildcard expand

Previously, when there is no *.{gz,zip} files under _dist, the wildcard
will be expanded to 2 strings '_dist/*.gz' and '_dist/*.zip'(see below).
helm$ ls _dist
helm$ make checksum
for f in _dist/*.{gz,zip} ; do \
	shasum -a 256 "${f}" | sed 's/_dist\///' > "${f}.sha256sum" ; \
	shasum -a 256 "${f}" | awk '{print $1}' > "${f}.sha256" ; \
done
shasum: _dist/*.gz:
shasum: _dist/*.gz:
shasum: _dist/*.zip:
shasum: _dist/*.zip:
helm$ ls _dist
'*.gz.sha256'  '*.gz.sha256sum'  '*.zip.sha256'  '*.zip.sha256sum'

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
pull/8738/head
Li Zhijian 4 years ago
parent f9077ecd65
commit d1c8561be6

@ -165,7 +165,7 @@ fetch-dist:
.PHONY: sign .PHONY: sign
sign: sign:
for f in _dist/*.{gz,zip,sha256,sha256sum} ; do \ for f in $$(ls _dist/*.{gz,zip,sha256,sha256sum} 2>/dev/null) ; do \
gpg --armor --detach-sign $${f} ; \ gpg --armor --detach-sign $${f} ; \
done done
@ -178,7 +178,7 @@ sign:
# removed in Helm v4. # removed in Helm v4.
.PHONY: checksum .PHONY: checksum
checksum: checksum:
for f in _dist/*.{gz,zip} ; do \ for f in $$(ls _dist/*.{gz,zip} 2>/dev/null) ; do \
shasum -a 256 "$${f}" | sed 's/_dist\///' > "$${f}.sha256sum" ; \ shasum -a 256 "$${f}" | sed 's/_dist\///' > "$${f}.sha256sum" ; \
shasum -a 256 "$${f}" | awk '{print $$1}' > "$${f}.sha256" ; \ shasum -a 256 "$${f}" | awk '{print $$1}' > "$${f}.sha256" ; \
done done

Loading…
Cancel
Save