Skip to content

Commit

Permalink
chore: try config again
Browse files Browse the repository at this point in the history
  • Loading branch information
medcl committed Nov 13, 2024
1 parent 6e634ca commit c0a0d28
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c0a0d28

Please sign in to comment.