[go: up one dir, main page]

Skip to content

Commit

Permalink
better docs-yaml build: Move yaml.mk in to main.mk and release.mk
Browse files Browse the repository at this point in the history
Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
  • Loading branch information
LukeShu committed Apr 19, 2022
1 parent d7112ff commit e849c03
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ $(call module,ambassador,$(OSS_HOME))
include $(OSS_HOME)/build-aux/generate.mk
include $(OSS_HOME)/build-aux/lint.mk

include $(OSS_HOME)/docs/yaml.mk

.git/hooks/prepare-commit-msg:
ln -s $(OSS_HOME)/tools/hooks/prepare-commit-msg $(OSS_HOME)/.git/hooks/prepare-commit-msg

Expand Down
14 changes: 14 additions & 0 deletions build-aux/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,17 @@ endif
fi; \
sed -e 's/\$$version\$$/$*/g' -e 's,\$$imageRepo\$$,'"$${registry}"'/emissary,g' <$(src) >$(dst); \
}$(NL)))

build-output/docs-yaml-%: $(shell find docs/yaml)
ifeq ($(CI),)
rm -rf $@
else
@if test -d $@; then \
echo 'This should not happen in CI: $@ should not need to change' >&2; \
echo 'Files triggering the change are: $?' >&2; \
exit 1; \
fi
endif
$(foreach src,$(filter %.yaml,$^),$(foreach dst,$(patsubst docs/yaml/%,$@/%,$(src)),\
mkdir -p $(dir $(dst))$(NL)\
sed -e 's/\$$version\$$/$*/g' -e 's/\$$quoteVersion$$/0.4.1/g' <$(src) >$(dst)$(NL)))
22 changes: 0 additions & 22 deletions docs/yaml.mk

This file was deleted.

9 changes: 9 additions & 0 deletions releng/release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,12 @@ else
manifests/push_manifests.sh $<
endif
.PHONY: push-manifests

publish-docs-yaml: build-output/docs-yaml-$(patsubst v%,%,$(VERSION))
ifneq ($(IS_PRIVATE),)
@echo "Private repo, not pushing chart" >&2
@exit 1
else
docs/publish_yaml_s3.sh $<
endif
.PHONY: publish-docs-yaml

0 comments on commit e849c03

Please sign in to comment.