Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Externalize Makefile helpers into scripts to move boards from tested/untested/unmaintained #1790

Open
tlaurion opened this issue Sep 9, 2024 · 0 comments

Comments

@tlaurion
Copy link
Collaborator

tlaurion commented Sep 9, 2024

This is unfit and doesn't permit to move untested boards back to tested boards since some boards are Makefile inclusions of others:

heads/Makefile

Lines 793 to 838 in 3fef9e0

board.move_untested_to_tested:
@echo "NEW_BOARD variable will remove UNTESTED_ prefix from $(BOARD)"
@NEW_BOARD=$$(echo $(BOARD) | sed 's/^UNTESTED_//'); \
echo "Renaming boards/$$BOARD/$$BOARD.config to boards/$$BOARD/$$NEW_BOARD.config"; \
mv boards/$$BOARD/$$BOARD.config boards/$$BOARD/$$NEW_BOARD.config; \
echo "Renaming boards/$$BOARD to boards/$$NEW_BOARD"; \
rm -rf boards/$$NEW_BOARD; \
mv boards/$$BOARD boards/$$NEW_BOARD; \
echo "Replacing $$BOARD with $$NEW_BOARD in .circleci/config.yml"; \
sed -i "s/$$BOARD/$$NEW_BOARD/g" .circleci/config.yml
board.move_unmaintained_to_tested:
@echo "NEW_BOARD variable will remove UNMAINTAINED_ prefix from $(BOARD)"
@NEW_BOARD=$$(echo $(BOARD) | sed 's/^UNMAINTAINED_//'); \
echo "Renaming boards/$$BOARD/$$BOARD.config to boards/$$BOARD/$$NEW_BOARD.config"; \
mv boards/$$BOARD/$$BOARD.config boards/$$BOARD/$$NEW_BOARD.config; \
echo "Renaming boards/$$BOARD to boards/$$NEW_BOARD"; \
rm -rf boards/$$NEW_BOARD; \
mv boards/$$BOARD boards/$$NEW_BOARD; \
echo "Replacing $$BOARD with $$NEW_BOARD in .circleci/config.yml"; \
sed -i "s/$$BOARD/$$NEW_BOARD/g" .circleci/config.yml; \
echo "Board $$BOARD has been moved to tested status as $$NEW_BOARD"; \
echo "Please review and update .circleci/config.yml manually if needed"
board.move_untested_to_unmaintained:
@echo "NEW_BOARD variable will move from UNTESTED_ to UNMAINTAINED_ from $(BOARD)"
@NEW_BOARD=$$(echo $(BOARD) | sed 's/^UNTESTED_/UNMAINTAINED_/g'); \
echo "Renaming boards/$$BOARD/$$BOARD.config to boards/$$BOARD/$$NEW_BOARD.config"; \
mkdir -p unmaintained_boards; \
mv boards/$$BOARD/$$BOARD.config unmaintained_boards/$$BOARD/$$NEW_BOARD.config; \
echo "Renaming boards/$$BOARD to unmaintainted_boards/$$NEW_BOARD"; \
rm -rf boards/$$NEW_BOARD; \
mv boards/$$BOARD unmaintained_boards/$$NEW_BOARD; \
echo "Replacing $$BOARD with $$NEW_BOARD in .circleci/config.yml. Delete manually entries"; \
sed -i "s/$$BOARD/$$NEW_BOARD/g" .circleci/config.yml
board.move_tested_to_untested:
@echo "NEW_BOARD variable will add UNTESTED_ prefix to $(BOARD)"
@NEW_BOARD=UNTESTED_$(BOARD); \
rm -rf boards/$${NEW_BOARD}; \
echo "Renaming boards/$(BOARD)/$(BOARD).config to boards/$(BOARD)/$${NEW_BOARD}.config"; \
mv boards/$(BOARD)/$(BOARD).config boards/$(BOARD)/$${NEW_BOARD}.config; \
echo "Renaming boards/$(BOARD) to boards/$${NEW_BOARD}"; \
mv boards/$(BOARD) boards/$${NEW_BOARD}; \
echo "Replacing $(BOARD) with $${NEW_BOARD} in .circleci/config.yml"; \
sed -i "s/$(BOARD)/$${NEW_BOARD}/g" .circleci/config.yml

Orders of operations are rigid error prone and imperfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant