Use url-safe characters in falco version

In some cases, you might want to host falco packages in a way where
they're directly accessible via http. The '+' character that separates
the version and the git hash ends up breaking naive solutions that don't
properly url-escape the package name before doing the http fetch.

Of course, clients can properly url-escape, but switching to a tilde is
url safe and I think still preserves the idea of separating the version
and hash.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
Mark Stemm
2021-03-11 14:41:35 -08:00
parent 34bbe2984f
commit 09ac4b9ff6

View File

@@ -27,7 +27,7 @@ if(NOT FALCO_VERSION)
set(FALCO_VERSION "0.0.0")
endif()
# Format FALCO_VERSION to be semver with prerelease and build part
string(REPLACE "-g" "+" FALCO_VERSION "${FALCO_VERSION}")
string(REPLACE "-g" "~" FALCO_VERSION "${FALCO_VERSION}")
else()
# A tag has been found: use it as the Falco version
set(FALCO_VERSION "${FALCO_TAG}")