Merge pull request #2 from josedario87/make-sync-commands
feat: Add Makefile commands for Gitea/GitHub synchronization
This commit is contained in:
25
Makefile
25
Makefile
@@ -1,3 +1,8 @@
|
||||
GITHUB_REPO_URL := https://github.com/josedario87/planilla.git
|
||||
GITEA_REPO_URL := ssh://<GITEA_USER>@<GITEA_HOST>:<GITEA_PORT>/nucleo000/planilla.git
|
||||
|
||||
.PHONY: sync-to-github sync-to-gitea
|
||||
|
||||
estructura:
|
||||
powershell -ExecutionPolicy Bypass -File ./dev/scripts/estructura.ps1
|
||||
|
||||
@@ -14,3 +19,23 @@ down:
|
||||
docker compose down
|
||||
|
||||
todo: estructura build
|
||||
|
||||
sync-to-github:
|
||||
@echo "Synchronizing to GitHub..."
|
||||
@if ! git remote | grep -q '^github$$'; then \
|
||||
echo "Adding GitHub remote..."; \
|
||||
git remote add github $(GITHUB_REPO_URL); \
|
||||
fi
|
||||
git push github --all
|
||||
git push github --tags
|
||||
@echo "Synchronization to GitHub complete."
|
||||
|
||||
sync-to-gitea:
|
||||
@echo "Synchronizing to Gitea..."
|
||||
@if ! git remote | grep -q '^gitea$$'; then \
|
||||
echo "Adding Gitea remote..."; \
|
||||
git remote add gitea $(GITEA_REPO_URL); \
|
||||
fi
|
||||
git push gitea --all
|
||||
git push gitea --tags
|
||||
@echo "Synchronization to Gitea complete."
|
||||
|
||||
Reference in New Issue
Block a user