Skip to content

Commit

Permalink
add fp_20 to be updated automatically; fix bug to have ID
Browse files Browse the repository at this point in the history
  • Loading branch information
anitacaron committed Nov 25, 2024
1 parent a5300b8 commit 3290f59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion principles/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ DOCS := $(foreach x, $(SCRIPTS), checks/$(notdir $(basename $(x))).md)
11 = 'Locus of Authority'
12 = 'Naming Conventions'
16 = Maintenance
20 = Responsiveness

# Generate all check docs
all: clean
Expand All @@ -33,7 +34,7 @@ build/fp_%.py: | build

# Build the MD page from the check script
checks/fp_%.md: build/fp_%.py | $(SCRIPTS) checks
$(eval ID := $(subst 0,,$(subst fp_,,$(notdir $(basename $@)))))
$(eval ID := $(shell echo $(subst fp_,,$(notdir $(basename $@))) | sed 's/^0*//'))
if [ $(ID) == 1 ]; then export TITLE=$(1); \
elif [ $(ID) == 2 ]; then export TITLE=$(2); \
elif [ $(ID) == 3 ]; then export TITLE=$(3); \
Expand All @@ -46,6 +47,7 @@ checks/fp_%.md: build/fp_%.py | $(SCRIPTS) checks
elif [ $(ID) == 11 ]; then export TITLE=$(11); \
elif [ $(ID) == 12 ]; then export TITLE=$(12); \
elif [ $(ID) == 16 ]; then export TITLE=$(16); \
elif [ $(ID) == 20 ]; then export TITLE=$(20); \
fi; \
echo "---\nlayout: check\nid: $(ID)\ntitle: $$TITLE Automated Check\n---\n" > $@
tail -n+3 $< \
Expand Down

0 comments on commit 3290f59

Please sign in to comment.