From b8eb1c779463583354c5ca18603a254921539bda Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Tue, 4 Feb 2014 21:31:35 +0100 Subject: [PATCH] Avoid 'cd' in Makefile. --- doc/Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 66969920d..d4860ca40 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,9 +1,10 @@ +GH_PAGES = ../../gh-pages + gh-pages: - git clone --branch=gh-pages https://${GH_TOKEN}@github.com/oliverschmidt/cc65.git ../gh-pages - cd ../gh-pages - git config user.name "Oliver Schmidt" - git config user.email "ol.sc@web.de" - echo date > testfile.txt - git add -A - git commit -m "Updated doc from commit $(TRAVIS_COMMIT)." - git push + git clone --branch=gh-pages https://$(GH_TOKEN)@github.com/oliverschmidt/cc65.git $(GH_PAGES) + git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.name "Oliver Schmidt" + git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git config user.email "ol.sc@web.de" + echo date > $(GH_PAGES)/testfile.txt + git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git add -A + git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git commit -m "Updated doc from commit $(TRAVIS_COMMIT)." + git --work-tree=$(GH_PAGES) --git-dir=$(GH_PAGES)/.git push -- 2.39.5