Commits

Ondřej Surý committed cfa969e

Create git_upload command in Makefile to upload to bitbucket

  • Participants
  • Parent commits 522d1f2

Comments (0)

Files changed (1)

 SSH_USER=root
 SSH_TARGET_DIR=/var/www
 
+GIT_DIR=../libgd.bitbucket.org/
 DROPBOX_DIR=~/Dropbox/Public/
 
 $(OUTPUTDIR):
 ftp_upload: publish
 	lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit"
 
+git_upload: publish
+	-[ ! -d $(GIT_DIR) ] && mkdir -p $(GIT_DIR)
+	rsync -CP -rvz --delete $(OUTPUTDIR)/ $(GIT_DIR)
+	cd $(GIT_DIR) && git add . && git commit -m "Publish on $$(date)"
+
 github: publish
 	ghp-import $(OUTPUTDIR)
 	git push origin gh-pages