aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2024-12-07 01:05:04 -0500
committerAnthony Wang2024-12-07 01:05:04 -0500
commit0832c05e77e41b42237ba93ee6e634e61a4d6d45 (patch)
treeb42efb22287c2161e591b44a419e520debfc5ecb
parent942433c091473304face9b27abb6385ad5c9d561 (diff)
Use push option to skip build
-rw-r--r--post-receive6
1 files changed, 6 insertions, 0 deletions
diff --git a/post-receive b/post-receive
index d888042..1e86a78 100644
--- a/post-receive
+++ b/post-receive
@@ -1,7 +1,13 @@
+# Skip build if using git push with -o or --push-option
+if [[ -v GIT_PUSH_OPTION_0 ]]; then
+ exit
+fi
+
# Solution to
# remote: fatal: not a git repository: '.'
unset GIT_DIR
+# Update local clone
cd /var/lib/forgejo/website
git pull
git submodule update