Skip to content

Commit 9182f7d

Browse files
authored
Merge pull request #3490 from AkihiroSuda/make-update-templates
Makefile: add `update-templates`
2 parents 492aeca + 7f9feb1 commit 9182f7d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ help-targets:
104104
@echo '- templates : Copy templates'
105105
@echo '- template_experimentals : Copy experimental templates to experimental/'
106106
@echo '- default_template : Copy default.yaml template'
107+
@echo '- update-templates : Update templates'
107108
@echo
108109
@echo 'Targets for files in _output/share/doc/lima:'
109110
@echo '- documentation : Copy documentation to _output/share/doc/lima'
@@ -353,6 +354,16 @@ _output/share/lima/templates/%: templates/%
353354
# On Windows, always copy to ensure the target has the same file as the source.
354355
force_link = $(if $(filter windows,$(GOOS)),force,$(shell test ! -L $(1) && echo force))
355356

357+
################################################################################
358+
# templates/_images
359+
360+
# fedora-N.yaml should not be updated to refer to Fedora N+1 images
361+
TEMPLATES_TO_BE_UPDATED = $(filter-out $(wildcard templates/_images/fedora*.yaml),$(wildcard templates/_images/*.yaml))
362+
363+
.PHONY: update-templates
364+
update-templates: $(TEMPLATES_TO_BE_UPDATED)
365+
./hack/update-template.sh $^
366+
356367
################################################################################
357368
# _output/share/doc/lima
358369
DOCUMENTATION = $(addprefix _output/share/doc/lima/,$(wildcard *.md) LICENSE SECURITY.md VERSION)

0 commit comments

Comments
 (0)