influx-cli/support.mk
Brandon Pfeifer 1164ca57ff
chore: use fpm for packaging (#476)
* chore: remove goreleaser configuration and scripts

* chore: replace goreleaser with fpm

goreleaser handled signing and uploading packages. So, that
functionality had to be implemented here as well.
2023-03-01 17:26:34 -05:00

18 lines
578 B
Makefile

# Add quotes to a string and escape any internal quotes.
# $(call with-quotes,alice bob) -> "alice bob"
# $(call with-quotes,) -> ""
# $(call with-quotes,Bobby "Drop Tables") -> "Bobby \"Drop Tables\""
define with-quotes
$(if $(1),"$(subst ",\",$(1))")
endef
# Generate a command line option in the form $(1)"$(2)", but only if $(2)
# is not empty.
# $(call with-param,-t=,) ->
# $(call with-param,-t=,Ralph Wiggum) -> -t="Ralph Wiggum"
# $(call with-param,-t=,Bobby "Drop Tables") -> -t="Bobby \"Drop Tables\""
define with-param
$(if $(2),$(1)$(call with-quotes,$(2)))
endef