From c0a0d280e17e49767b55dcee7167f1cdf13f6c56 Mon Sep 17 00:00:00 2001 From: medcl Date: Wed, 13 Nov 2024 11:18:37 +0800 Subject: [PATCH] chore: try config again --- Makefile | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 97bc33ef..689c8ca8 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,27 @@ BRANCH_FILE := $(OUTPUT)/branch_list.txt default: build -#linux only config: cp docs/config.yaml config.bak + # Check if config.yaml exists + if [ ! -f docs/config.yaml ]; then \ + echo "docs/config.yaml not found!"; \ + exit 1; \ + fi + + # Check the OS and set the sed command accordingly + if [ "$(uname)" == "Darwin" ]; then \ + sed_command="sed -i .bak"; \ + else \ + sed_command="sed -i"; \ + fi + + # Debug the sed command and version variable + echo "Using sed command: $(sed_command)" + echo "VERSION: $(VERSION)" + # Replace "BRANCH" in config.yaml with the value of VERSION - sed -i 's/BRANCH/$(VERSION)/g' docs/config.yaml + $(sed_command) 's/BRANCH/$(VERSION)/g' docs/config.yaml build: config echo $(VERSIONS)