Skip to content

Commit 05f779e

Browse files
committed
Problem: Some projects use stable=0/1 with unexpected results
Solution: Support stable=0 as state=draft and stable=1 as state=stable, and warn that project.xml should be updated into a proper definition of the state. Signed-off-by: Jim Klimov <[email protected]>
1 parent 8589253 commit 05f779e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: zproject_class_api.gsl

+9
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ function set_state (element, default)
7979
| my.element.state = "deprecated" \
8080
| my.element.private ?= 1
8181
my.element.draft = 0
82+
elsif my.element.stable ?= 0 | my.element.stable ?= 1
83+
echo "LEGACY HACK WARNING: Usage of 'stable' boolean attribute in $(name (my.element)) is deprecated, please choose a 'state' instead"
84+
if my.element.stable ?= 0
85+
my.element.draft = 1
86+
my.element.state = "draft"
87+
else
88+
my.element.draft = 0
89+
my.element.state = "stable"
90+
endif
8291
elsif my.element.state = "draft"
8392
my.element.draft = 1
8493
else

0 commit comments

Comments
 (0)