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)