summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-12-02 14:17:39 +0800
committerErik Kundiman <erik@megapahit.org>2024-12-02 14:17:39 +0800
commitdbbfd7148a548eb21677913483e7d79698e03d2c (patch)
treeb3f93a49c5471124bff12a8a0ac9edc598a65b4b
parent6573bd24b06b7ef3b96bde9877a6be612fe3aaf9 (diff)
Rename product to website & track the post-commit
and put the hooks in its own folder.
-rwxr-xr-xhooks/post-commit12
-rwxr-xr-xhooks/post-receive (renamed from post-receive)3
2 files changed, 13 insertions, 2 deletions
diff --git a/hooks/post-commit b/hooks/post-commit
new file mode 100755
index 0000000..ca4d55a
--- /dev/null
+++ b/hooks/post-commit
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+pass=0
+cd $PWD \
+ && scp hooks/post-receive \
+ megapahit.net:/usr/local/git/pub/website.git/hooks/ \
+ && pass=1
+
+if [ $pass = 0 ]
+then
+ exit 1
+fi
diff --git a/post-receive b/hooks/post-receive
index 45df983..d84579e 100755
--- a/post-receive
+++ b/hooks/post-receive
@@ -1,8 +1,7 @@
#!/bin/sh
-product=web
+product=website
repo=/usr/local/git/pub/$product.git
-#web=$HOME/public_html
web=~www/apache24/data
unset GIT_DIR