Make: error if BUILD_VERSION does not start with "v" (#2355)

This commit is contained in:
mmetc 2023-07-18 09:31:04 +02:00 committed by GitHub
parent f9ca14f010
commit 6c8ddbccac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,6 +43,11 @@ PLUGINS_DIR = ./plugins/notifications
CROWDSEC_BIN = crowdsec$(EXT) CROWDSEC_BIN = crowdsec$(EXT)
CSCLI_BIN = cscli$(EXT) CSCLI_BIN = cscli$(EXT)
# semver comparison to select the hub branch requires the version to start with "v"
ifneq ($(call substr,$(BUILD_VERSION),1,1),v)
$(error BUILD_VERSION "$(BUILD_VERSION)" should start with "v")
endif
# Directory for the release files # Directory for the release files
RELDIR = crowdsec-$(BUILD_VERSION) RELDIR = crowdsec-$(BUILD_VERSION)