Skip to content

Commit 29e9c93

Browse files
authored
Merge pull request #2809 from AkihiroSuda/dev
Rename `examples` to `templates` on the git repo
2 parents 942ba51 + d702642 commit 29e9c93

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+34
-637
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
run: sudo make install
110110
- name: Verify templates match `limactl edit` format
111111
run: |
112-
find examples -name '*.yaml' -exec limactl edit --set 'del(.nothing)' {} \;
112+
find templates -name '*.yaml' -exec limactl edit --set 'del(.nothing)' {} \;
113113
git diff-index --exit-code HEAD
114114
- name: Uninstall
115115
run: sudo make uninstall

Makefile

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ help-targets:
8989
@echo '- templates : Copy templates'
9090
@echo '- template_experimentals : Copy experimental templates to experimental/'
9191
@echo '- default_template : Copy default.yaml template'
92-
@echo '- create-examples-link : Create a symlink at ../examples pointing to templates'
9392
@echo
9493
@echo 'Targets for files in _output/share/doc/lima:'
9594
@echo '- documentation : Copy documentation to _output/share/doc/lima'
@@ -146,7 +145,7 @@ menuconfig: Kconfig
146145
################################################################################
147146
.PHONY: binaries
148147
binaries: limactl helpers guestagents \
149-
templates template_experimentals create-examples-link \
148+
templates template_experimentals \
150149
documentation create-links-in-doc-dir
151150

152151
################################################################################
@@ -313,8 +312,8 @@ MKDIR_TARGETS += _output/share/lima
313312

314313
################################################################################
315314
# _output/share/lima/templates
316-
TEMPLATES = $(addprefix _output/share/lima/templates/,$(filter-out experimental,$(notdir $(wildcard examples/*))))
317-
TEMPLATE_EXPERIMENTALS = $(addprefix _output/share/lima/templates/experimental/,$(notdir $(wildcard examples/experimental/*)))
315+
TEMPLATES = $(addprefix _output/share/lima/templates/,$(filter-out experimental,$(notdir $(wildcard templates/*))))
316+
TEMPLATE_EXPERIMENTALS = $(addprefix _output/share/lima/templates/experimental/,$(notdir $(wildcard templates/experimental/*)))
318317

319318
.PHONY: default_template templates template_experimentals
320319
default_template: _output/share/lima/templates/default.yaml
@@ -325,28 +324,14 @@ $(TEMPLATES): | _output/share/lima/templates
325324
$(TEMPLATE_EXPERIMENTALS): | _output/share/lima/templates/experimental
326325
MKDIR_TARGETS += _output/share/lima/templates _output/share/lima/templates/experimental
327326

328-
_output/share/lima/templates/%: examples/%
327+
_output/share/lima/templates/%: templates/%
329328
cp -aL $< $@
330329

331330
# returns "force" if GOOS==windows, or GOOS!=windows and the file $(1) is not a symlink.
332331
# $(1): target file
333332
# On Windows, always copy to ensure the target has the same file as the source.
334333
force_link = $(if $(filter windows,$(GOOS)),force,$(shell test ! -L $(1) && echo force))
335334

336-
################################################################################
337-
# _output/share/lima/examples
338-
.PHONY: create-examples-link
339-
create-examples-link: _output/share/lima/examples
340-
_output/share/lima/examples: _output/share/lima/templates $$(call force_link,$$@)
341-
# remove the existing directory or symlink
342-
rm -rf $@
343-
ifneq ($(GOOS),windows)
344-
ln -sf templates $@
345-
else
346-
# copy from templates built in build process
347-
cp -aL $< $@
348-
endif
349-
350335
################################################################################
351336
# _output/share/doc/lima
352337
DOCUMENTATION = $(addprefix _output/share/doc/lima/,$(wildcard *.md) LICENSE SECURITY.md VERSION)
@@ -366,7 +351,7 @@ _output/share/doc/lima/%: % | _output/share/doc/lima
366351
MKDIR_TARGETS += _output/share/doc/lima
367352

368353
.PHONY: create-links-in-doc-dir
369-
create-links-in-doc-dir: _output/share/doc/lima/templates _output/share/doc/lima/examples
354+
create-links-in-doc-dir: _output/share/doc/lima/templates
370355
_output/share/doc/lima/templates: _output/share/lima/templates $$(call force_link,$$@)
371356
# remove the existing directory or symlink
372357
rm -rf $@
@@ -376,15 +361,6 @@ else
376361
# copy from templates built in build process
377362
cp -aL $< $@
378363
endif
379-
_output/share/doc/lima/examples: _output/share/doc/lima/templates $$(call force_link,$$@)
380-
# remove the existing directory or symlink
381-
rm -rf $@
382-
ifneq ($(GOOS),windows)
383-
ln -sf templates $@
384-
else
385-
# copy from templates built in build process
386-
cp -aL $< $@
387-
endif
388364

389365
################################################################################
390366
# returns difference between GOOS GOARCH and GOHOSTOS GOHOSTARCH.
@@ -424,12 +400,12 @@ endif
424400
################################################################################
425401
schema-limayaml.json: _output/bin/limactl$(exe)
426402
ifeq ($(native_compiling),true)
427-
$< generate-jsonschema --schemafile $@ examples/default.yaml
403+
$< generate-jsonschema --schemafile $@ templates/default.yaml
428404
endif
429405

430406
.PHONY: check-jsonschema
431407
check-jsonschema: schema-limayaml.json
432-
check-jsonschema --schemafile $< examples/default.yaml
408+
check-jsonschema --schemafile $< templates/default.yaml
433409

434410
################################################################################
435411
.PHONY: diagrams
@@ -523,8 +499,8 @@ artifact: $(addprefix $(ARTIFACT_PATH_COMMON),$(ARTIFACT_FILE_EXTENSIONS))
523499

524500
ARTIFACT_DES = _output/bin/limactl$(exe) $(LIMA_DEPS) $(HELPERS_DEPS) \
525501
$(ALL_GUESTAGENTS) \
526-
$(TEMPLATES) $(TEMPLATE_EXPERIMENTALS) _output/share/lima/examples \
527-
$(DOCUMENTATION) _output/share/doc/lima/templates _output/share/doc/lima/examples \
502+
$(TEMPLATES) $(TEMPLATE_EXPERIMENTALS) \
503+
$(DOCUMENTATION) _output/share/doc/lima/templates \
528504
_output/share/man/man1/limactl.1
529505

530506
# file targets

README.ja.md

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)