diff options
author | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-12-08 20:48:02 +0100 |
---|---|---|
committer | Gregor Kleen <pngwjpgh@users.noreply.github.com> | 2016-12-08 20:48:02 +0100 |
commit | 946bc4b8690d29964a2f20484e9af7556d19e258 (patch) | |
tree | b4b33960c386cad52ef72bea55d97f34786a88ab | |
parent | 5adbe161b48ff144f1597d4c638f94bac8af554e (diff) | |
download | dirty-haskell.org-946bc4b8690d29964a2f20484e9af7556d19e258.tar dirty-haskell.org-946bc4b8690d29964a2f20484e9af7556d19e258.tar.gz dirty-haskell.org-946bc4b8690d29964a2f20484e9af7556d19e258.tar.bz2 dirty-haskell.org-946bc4b8690d29964a2f20484e9af7556d19e258.tar.xz dirty-haskell.org-946bc4b8690d29964a2f20484e9af7556d19e258.zip |
Update git-deploy
-rw-r--r-- | provider/posts/blog/git-deploy.md | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/provider/posts/blog/git-deploy.md b/provider/posts/blog/git-deploy.md index af4d29b..ddda12f 100644 --- a/provider/posts/blog/git-deploy.md +++ b/provider/posts/blog/git-deploy.md | |||
@@ -30,21 +30,20 @@ done | |||
30 | 30 | ||
31 | $touchedMaster || exit 0 | 31 | $touchedMaster || exit 0 |
32 | 32 | ||
33 | exec &>(logger --id=$$ -p daemon.info -t dirty-haskell) | 33 | { |
34 | 34 | tmpDir=$(mktemp -d) | |
35 | tmpDir=$(mktemp -d) | 35 | delTmpDir() { |
36 | delTmpDir() { | 36 | cd / |
37 | cd / | 37 | rm -rf ${tmpDir} |
38 | rm -rvf ${tmpDir} | 38 | } |
39 | } | 39 | |
40 | 40 | trap delTmpDir EXIT | |
41 | trap delTmpDir EXIT | 41 | |
42 | 42 | git clone --branch master --depth 1 --single-branch file://$(pwd) ${tmpDir} | |
43 | git clone --branch master --depth 1 --single-branch . ${tmpDir} | 43 | |
44 | 44 | cd ${tmpDir} | |
45 | cd ${tmpDir} | 45 | nix-shell --run "dirty-haskell build && dirty-haskell deploy" |
46 | nix-shell --run "dirty-haskell build" | 46 | } 2>&1 | stdbuf -o 0 tr '\r' '\n' | logger --id=$$ -p daemon.info -t dirty-haskell |
47 | nix-shell --run "dirty-haskell deploy" | ||
48 | ~~~ | 47 | ~~~ |
49 | 48 | ||
50 | The script checks if the master branch was moved to a new commit or otherwise | 49 | The script checks if the master branch was moved to a new commit or otherwise |
@@ -52,6 +51,10 @@ touched and, if so, clones a copy of the repo to a temporary directory and runs | |||
52 | hakyll´s deploy command in it, which is set to rsync the compiled version to a | 51 | hakyll´s deploy command in it, which is set to rsync the compiled version to a |
53 | folder where it´ll be picked up by nginx. | 52 | folder where it´ll be picked up by nginx. |
54 | 53 | ||
54 | ## Update ## | ||
55 | |||
56 | It works. | ||
57 | |||
55 | [hakyll]: https://jaspervdj.be/hakyll/ | 58 | [hakyll]: https://jaspervdj.be/hakyll/ |
56 | [rsync]: https://git.samba.org/rsync.git | 59 | [rsync]: https://git.samba.org/rsync.git |
57 | [gitolite]: http://gitolite.com | 60 | [gitolite]: http://gitolite.com |