aboutsummaryrefslogtreecommitdiffstats
path: root/build/test-env-prepare.sh
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-11-19 13:58:34 +0800
committerGitHub <noreply@github.com>2021-11-19 13:58:34 +0800
commite4b95de38856fac845c21348971e3c5343ceac15 (patch)
tree5702fc5ab5659f7fc48a66dd5e5f8e013df00c41 /build/test-env-prepare.sh
parent9361b65f542671457ed09c35ddde9d09ee06d136 (diff)
downloadgitea-e4b95de38856fac845c21348971e3c5343ceac15.tar.gz
gitea-e4b95de38856fac845c21348971e3c5343ceac15.zip
Prepare and check test env during CI (#17725)
This PR should resolve the permission problems during CI, if the uid doesn't match, a more clear message is shown. * CI fails with unknown permission problems #17710 The new drone step dependencies: (root)prepare-test-env -> (gitea)build -> (gitea)test
Diffstat (limited to 'build/test-env-prepare.sh')
-rwxr-xr-xbuild/test-env-prepare.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/test-env-prepare.sh b/build/test-env-prepare.sh
new file mode 100755
index 0000000000..0c5bc25f11
--- /dev/null
+++ b/build/test-env-prepare.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ ! -f ./build/test-env-prepare.sh ]; then
+ echo "${0} can only be executed in gitea source root directory"
+ exit 1
+fi
+
+echo "change the owner of files to gitea ..."
+chown -R gitea:gitea .