Skip to content

Commit

Permalink
Don't raise error when running update-ci and attempting to remove u…
Browse files Browse the repository at this point in the history
…nexisting CI
  • Loading branch information
gmantele authored and msdemlei committed Nov 27, 2024
1 parent 7e11156 commit b605650
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,18 @@ $(GITHUB_PREVIEW): $(GITHUB_WORKFLOWS) $(GITHUB_PREVIEW_TEMPLATE)
github-preview: $(GITHUB_BUILD) $(GITHUB_PREVIEW)

check-clear-ci:
@echo "* You are about to remove the current following GitHub workflows:\n - $(GITHUB_BUILD)\n - $(GITHUB_PREVIEW)"
@read -p " => Are you sure you want to remove them? [y/N] " ans && ans=$${ans:-N} ; \
ans=$$(echo $${ans} | tr '[:upper:]' '[:lower:]') ; \
[ $${ans} = y ] || [ $${ans} = yes ]
@if [ -f "$(GITHUB_BUILD)" -o -f "$(GITHUB_PREVIEW)" ]; then \
echo "* You are about to remove the current following GitHub workflows:\n - $(GITHUB_BUILD)\n - $(GITHUB_PREVIEW)" ; \
read -p " => Are you sure you want to remove them? [y/N] " ans && ans=$${ans:-N} ; \
ans=$$(echo $${ans} | tr '[:upper:]' '[:lower:]') ; \
[ $${ans} = y ] || [ $${ans} = yes ] ; \
fi

clear-ci: check-clear-ci
@rm $(GITHUB_BUILD) $(GITHUB_PREVIEW)
@echo " => GitHub workflows removed."
@if [ -f "$(GITHUB_BUILD)" -o -f "$(GITHUB_PREVIEW)" ]; then \
rm -f $(GITHUB_BUILD) $(GITHUB_PREVIEW) && \
echo " => GitHub workflows removed." ; \
fi

update-ci: clear-ci github-preview

Expand Down

0 comments on commit b605650

Please sign in to comment.