"Auto-commit via make git"
Some checks are pending
Build NFDOS ISO / build (push) Waiting to run

This commit is contained in:
neo.webmaster.2@gmail.com 2025-11-27 11:39:26 +01:00
parent 8e4780b26b
commit 856de6bf6b

View File

@ -137,12 +137,12 @@ sync-neurotron:
exit 0; \ exit 0; \
fi fi
dnf === 1) Verificar remote atual === @# === 1) Verificar remote atual ===
@cd $(NEUROTRON_DIR) && \ @cd $(NEUROTRON_DIR) && \
REMOTE_URL=$$(git remote get-url $(NEUROTRON_REMOTE)); \ REMOTE_URL=$$(git remote get-url $(NEUROTRON_REMOTE)); \
echo "🔍 Remote atual do Neurotron: $$REMOTE_URL"; \ echo "🔍 Remote atual do Neurotron: $$REMOTE_URL"; \
\ \
dnf === 2) Se HTTPS → converter para SSH:2222 === @# === 2) Se HTTPS → converter para SSH:2222 ===
if echo $$REMOTE_URL | grep -q '^https://gitea\.neoricalex\.com'; then \ if echo $$REMOTE_URL | grep -q '^https://gitea\.neoricalex\.com'; then \
echo "⚠️ Neurotron ainda está em HTTPS. Convertendo para SSH:2222…"; \ echo "⚠️ Neurotron ainda está em HTTPS. Convertendo para SSH:2222…"; \
SSH_URL=$$(echo $$REMOTE_URL | sed -E 's|https://gitea\.neoricalex\.com[:/]+|ssh://git@gitea.neoricalex.com:2222/|'); \ SSH_URL=$$(echo $$REMOTE_URL | sed -E 's|https://gitea\.neoricalex\.com[:/]+|ssh://git@gitea.neoricalex.com:2222/|'); \
@ -150,7 +150,7 @@ sync-neurotron:
echo "✅ Remote atualizado: $$SSH_URL"; \ echo "✅ Remote atualizado: $$SSH_URL"; \
fi; \ fi; \
\ \
dnf === 3) Se SSH mas sem porta, forçar porta 2222 === @# === 3) Se SSH mas sem porta, forçar porta 2222 ===
if echo $$REMOTE_URL | grep -q '^ssh://git@gitea\.neoricalex\.com/'; then \ if echo $$REMOTE_URL | grep -q '^ssh://git@gitea\.neoricalex\.com/'; then \
echo "⚠️ SSH sem porta detectado. Ajustando porta 2222…"; \ echo "⚠️ SSH sem porta detectado. Ajustando porta 2222…"; \
SSH_URL=$$(echo $$REMOTE_URL | sed -E 's|ssh://git@gitea.neoricalex.com/|ssh://git@gitea.neoricalex.com:2222/|'); \ SSH_URL=$$(echo $$REMOTE_URL | sed -E 's|ssh://git@gitea.neoricalex.com/|ssh://git@gitea.neoricalex.com:2222/|'); \
@ -158,7 +158,7 @@ sync-neurotron:
echo "✅ Remote atualizado: $$SSH_URL"; \ echo "✅ Remote atualizado: $$SSH_URL"; \
fi fi
dnf === 4) Testar conexão SSH antes do push === @# === 4) Testar conexão SSH antes do push ===
@if ssh -T git@gitea.neoricalex.com -p 2222 2>&1 | grep -q "successfully authenticated"; then \ @if ssh -T git@gitea.neoricalex.com -p 2222 2>&1 | grep -q "successfully authenticated"; then \
echo "🔐 SSH OK para Neurotron."; \ echo "🔐 SSH OK para Neurotron."; \
else \ else \
@ -166,7 +166,7 @@ sync-neurotron:
exit 1; \ exit 1; \
fi fi
dnf === 5) Commit + push automático === @# === 5) Commit + push automático ===
@cd $(NEUROTRON_DIR) && \ @cd $(NEUROTRON_DIR) && \
git add -A && \ git add -A && \
git commit -m "Auto-commit via make git (triggered by NFDOS)" || echo "Nenhuma modificação no Neurotron."; \ git commit -m "Auto-commit via make git (triggered by NFDOS)" || echo "Nenhuma modificação no Neurotron."; \