docs(Makefile): add rsync dry-run options
This commit is contained in:
parent
431ef65af5
commit
6f8f9da109
1 changed files with 11 additions and 0 deletions
11
Makefile
11
Makefile
|
@ -15,6 +15,7 @@ REMOTE_USER=$(shell pass rsyncd/mirror-${REPO_NAME}-user)
|
||||||
REMOTE_HOST=$(shell pass rsyncd/mirror-${REPO_NAME}-host)
|
REMOTE_HOST=$(shell pass rsyncd/mirror-${REPO_NAME}-host)
|
||||||
REMOTE_PATH=${REPO_NAME}
|
REMOTE_PATH=${REPO_NAME}
|
||||||
RSYNC_OPTS=-lrhvPt --delete
|
RSYNC_OPTS=-lrhvPt --delete
|
||||||
|
RSYNC_OPTS_DRY=${RSYNC_OPTS} --dry-run
|
||||||
RSYNC_PASSWORD=$(shell pass rsyncd/mirror-${REPO_NAME})
|
RSYNC_PASSWORD=$(shell pass rsyncd/mirror-${REPO_NAME})
|
||||||
|
|
||||||
##@ Package
|
##@ Package
|
||||||
|
@ -39,6 +40,16 @@ push: ## Sync local repository with remote repository
|
||||||
@echo "$(BOLD)$(GREEN)[*] $(RST)$(BOLD)Syncing local with remote repository…$(RST)"
|
@echo "$(BOLD)$(GREEN)[*] $(RST)$(BOLD)Syncing local with remote repository…$(RST)"
|
||||||
@RSYNC_PASSWORD=$(RSYNC_PASSWORD) rsync $(RSYNC_OPTS) $(REPO_PATH)/ rsync://$(REMOTE_USER)@$(REMOTE_HOST)/$(REMOTE_PATH)
|
@RSYNC_PASSWORD=$(RSYNC_PASSWORD) rsync $(RSYNC_OPTS) $(REPO_PATH)/ rsync://$(REMOTE_USER)@$(REMOTE_HOST)/$(REMOTE_PATH)
|
||||||
|
|
||||||
|
.PHONY: dry-pull
|
||||||
|
dry-pull: ## Sync remote repository with local repository (dry run)
|
||||||
|
@echo "$(BOLD)$(GREEN)[*] $(RST)$(BOLD)Syncing remote with local repository…$(RST)"
|
||||||
|
@RSYNC_PASSWORD=$(RSYNC_PASSWORD) rsync $(RSYNC_OPTS_DRY) rsync://$(REMOTE_USER)@$(REMOTE_HOST)/$(REMOTE_PATH) $(REPO_PATH)/
|
||||||
|
|
||||||
|
.PHONY: dry-push
|
||||||
|
dry-push: ## Sync local repository with remote repository (dry run)
|
||||||
|
@echo "$(BOLD)$(GREEN)[*] $(RST)$(BOLD)Syncing local with remote repository…$(RST)"
|
||||||
|
@RSYNC_PASSWORD=$(RSYNC_PASSWORD) rsync $(RSYNC_OPTS_DRY) $(REPO_PATH)/ rsync://$(REMOTE_USER)@$(REMOTE_HOST)/$(REMOTE_PATH)
|
||||||
|
|
||||||
##@ Utility
|
##@ Utility
|
||||||
.DEFAULT_GOAL = help
|
.DEFAULT_GOAL = help
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
|
|
Loading…
Reference in a new issue