mirror of
https://github.com/debpalash/VoiceStudio.git
synced 2026-12-04 01:18:16 +00:00
fix(dev): preview unless DRY_RUN is exactly 0, false or no
'false 0' filtered to an empty value and deleted app data instead of previewing (CodeRabbit). Several words, like any unfamiliar value, now preview.
This commit is contained in:
1 parent
4e0503c7ff
commit
f230baad04
2 files changed
+9
-3
No files matched your search
@@ -135,8 +135,9 @@ make clean:all DRY_RUN=1 # Make preview; omit DRY_RUN=1 to delete
|
||||
```
|
||||
|
||||
Plain `make` still starts the release flow; cleanup must be selected explicitly.
|
||||
For Make, any non-empty `DRY_RUN` value except `0`, `false` or `no` enables
|
||||
preview mode, including `true`, `yes` and unfamiliar values.
|
||||
For Make, any non-empty `DRY_RUN` value enables preview mode unless it is
|
||||
exactly one of `0`, `false` or `no`; `true`, `yes`, unfamiliar values and
|
||||
several words (such as `false 0`) all preview.
|
||||
|
||||
The script needs Git and Node, but no installed project dependencies. It removes
|
||||
project `node_modules`, Python virtual environments (including custom names
|
||||
|
||||
@@ -6,9 +6,14 @@
|
||||
PYTHON ?= python3
|
||||
NODE ?= node
|
||||
|
||||
# Deletes only when DRY_RUN is unset or exactly one of 0/false/no; any other
|
||||
# value, including several words such as 'false 0', previews (--dry-run).
|
||||
CLEAN_DRY_RUN := $(strip $(DRY_RUN))
|
||||
CLEAN_DRY_RUN_FLAG := $(if $(CLEAN_DRY_RUN),$(if $(and $(filter 1,$(words $(CLEAN_DRY_RUN))),$(filter 0 false no,$(CLEAN_DRY_RUN))),,--dry-run),)
|
||||
|
||||
.PHONY: clean\:all
|
||||
clean\:all: ## Delete project dependencies, builds/caches and app data; DRY_RUN=1 previews
|
||||
$(NODE) scripts/clean-all.mjs $(if $(filter-out 0 false no,$(strip $(DRY_RUN))),--dry-run)
|
||||
$(NODE) scripts/clean-all.mjs $(CLEAN_DRY_RUN_FLAG)
|
||||
|
||||
release: ## Cut a release: asks stable/beta, draft/publish, then confirms
|
||||
uv run python scripts/release.py
|
||||
|
||||
Reference in new issue
Block a user