Do not produce empty signature files
@@ -12,8 +12,8 @@ OUTPUT="${2:?missing output argument}"
case "$(basename "$FILE")" in
"redskyctl-darwin-amd64.tar.gz")
# If there are no credentials, just produce an empty file (otherwise fall through)
- if [ -n "${AC_USERNAME:-}" ] || [ -n "${AC_PASSWORD:-}" ] ; then
- touch "${OUTPUT}"
+ if [ -z "${AC_USERNAME:-}" ] || [ -z "${AC_PASSWORD:-}" ] ; then
+ echo "Not empty" > "${OUTPUT}"
exit
fi
;;
@@ -24,7 +24,7 @@ case "$(basename "$FILE")" in
;;
*)
# Just create an empty file to upload to the release
- touch "${OUTPUT}"
+ echo "Not empty" > "${OUTPUT}"
exit
;;
esac
