File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,17 @@ PIP := $(VENV)/bin/pip
44SPECKIT_VERSION ?=
55SPECKIT_BIN := $(VENV ) /bin/speckit
66SPECKIT_SPEC := speckit
7- # Semver-like: major.minor.patch with optional dot-separated pre-release identifiers.
7+ # Semver-like: major.minor.patch with optional dot-separated pre-release identifiers (numeric identifiers are allowed) .
88SPECKIT_SEMVER_REGEX := ^[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9]+(\.[A-Za-z0-9]+)*)?$$
99SPECKIT_VERSION_CLEAN := $(strip $(SPECKIT_VERSION ) )
10+ SPECKIT_VERSION_VALID := $(if $(SPECKIT_VERSION_CLEAN ) ,$(shell echo "$(SPECKIT_VERSION_CLEAN ) " | grep -E '$(SPECKIT_SEMVER_REGEX ) ' >/dev/null && echo valid) ,valid)
1011
1112ifneq ($(SPECKIT_VERSION_CLEAN ) ,)
1213# Require a semver-like value; optional suffix is dot-separated alphanumeric identifiers.
1314ifneq ($(findstring ..,$(SPECKIT_VERSION_CLEAN ) ) ,)
1415$(error SPECKIT_VERSION cannot contain consecutive dots)
1516endif
16- ifneq ($(shell echo " $( SPECKIT_VERSION_CLEAN ) " | grep -E ' $( SPECKIT_SEMVER_REGEX ) ' >/dev/null && echo valid ) ,valid)
17+ ifneq ($(SPECKIT_VERSION_VALID ) ,valid)
1718$(error SPECKIT_VERSION must be semver-like (e.g., 0.2.0 or 1.2.3-rc.1; suffix is dot-separated alphanumeric identifiers))
1819endif
1920SPECKIT_SPEC := speckit==$(SPECKIT_VERSION_CLEAN )
You can’t perform that action at this time.
0 commit comments