From 44d8a0788f8040497b2dafa0b4b3b2ab2e57f37b Mon Sep 17 00:00:00 2001 From: suin Date: Fri, 2 Nov 2018 12:36:07 +0900 Subject: [PATCH] chore: add demo script to Makefile To run demo, run `make demo`. --- Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Makefile b/Makefile index ceb9a99..ad6762e 100644 --- a/Makefile +++ b/Makefile @@ -21,3 +21,30 @@ build: fmt install: build cp bin/$(APP_NAME) /usr/local/bin/$(APP_NAME) + +demo: demo-prepare demo-exec + +demo-prepare: + -rm -rf /tmp/git-remind-demo + mkdir -p /tmp/git-remind-demo + cd /tmp/git-remind-demo && \ + git init myapp1 && \ + git init --bare myapp2-origin.git && \ + git clone /tmp/git-remind-demo/myapp2-origin.git myapp2 && \ + git init myapp3 && \ + cd /tmp/git-remind-demo/myapp1 && \ + touch unstaged-file + cd /tmp/git-remind-demo/myapp2 && \ + git commit --allow-empty -m commit1 && \ + git push && \ + git commit --allow-empty -m commit2 + +demo-exec: + @echo + @echo "==== D E M O ====" + @echo + @set -eux && \ + export GIT_REMIND_PATHS='/tmp/git-remind-demo/*' && \ + git-remind paths && \ + git-remind status -a && \ + git-remind status-notification