Browse Source

Fix hooks for integration repo (#2216)

Ethan Koenig 2 years ago
parent
commit
aff11bc65e

+ 7 - 0
integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive

@@ -0,0 +1,7 @@
1
+#!/usr/bin/env bash
2
+ORI_DIR=`pwd`
3
+SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
4
+cd "$ORI_DIR"
5
+for i in `ls "$SHELL_FOLDER/post-receive.d"`; do
6
+    sh "$SHELL_FOLDER/post-receive.d/$i"
7
+done

+ 2 - 0
integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/post-receive.d/gitea

@@ -0,0 +1,2 @@
1
+#!/usr/bin/env bash
2
+"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' post-receive

+ 3 - 3
integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-rebase.sample

@@ -88,9 +88,7 @@ else
88 88
 	exit 1
89 89
 fi
90 90
 
91
-exit 0
92
-
93
-################################################################
91
+<<\DOC_END
94 92
 
95 93
 This sample hook safeguards topic branches that have been
96 94
 published from being rewound.
@@ -167,3 +165,5 @@ To compute (2):
167 165
 	git rev-list master..topic
168 166
 
169 167
 	if this is empty, it is fully merged to "master".
168
+
169
+DOC_END

+ 7 - 0
integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive

@@ -0,0 +1,7 @@
1
+#!/usr/bin/env bash
2
+ORI_DIR=`pwd`
3
+SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
4
+cd "$ORI_DIR"
5
+for i in `ls "$SHELL_FOLDER/pre-receive.d"`; do
6
+    sh "$SHELL_FOLDER/pre-receive.d/$i"
7
+done

+ 2 - 0
integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/pre-receive.d/gitea

@@ -0,0 +1,2 @@
1
+#!/usr/bin/env bash
2
+"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' pre-receive

+ 7 - 0
integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update

@@ -0,0 +1,7 @@
1
+#!/usr/bin/env bash
2
+ORI_DIR=`pwd`
3
+SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
4
+cd "$ORI_DIR"
5
+for i in `ls "$SHELL_FOLDER/update.d"`; do
6
+    sh "$SHELL_FOLDER/update.d/$i" $1 $2 $3
7
+done

+ 2 - 0
integrations/gitea-integration-meta/gitea-repositories/user3/repo3.git/hooks/update.d/gitea

@@ -0,0 +1,2 @@
1
+#!/usr/bin/env bash
2
+"$GITEA_ROOT/gitea" hook --config='integrations/app.ini' update $1 $2 $3