File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ trap _cleanup EXIT
56
56
main () {
57
57
mkdir -p " $OUT_DIR "
58
58
59
+ ensure_git_safety
59
60
dump_config
60
61
init_source_epoch
61
62
provision_loong_rootfs " $ROOTFS_IMAGE_TAG " " $ROOTFS_DIR "
Original file line number Diff line number Diff line change 1
1
# this file is meant to be sourced
2
2
3
+ REPO_ROOT=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd) "
3
4
_IMAGE_TAG_PREFIX=" ghcr.io/loongson-community"
4
5
5
6
builder_image_tag () {
@@ -65,6 +66,15 @@ echo_kv() {
65
66
echo " $( _term yellow) ${k} : $( _term cyan) $@ $( _term reset) "
66
67
}
67
68
69
+ ensure_git_safety () {
70
+ [[ -n $CI ]] || return 0
71
+ [[ -O " $REPO_ROOT " ]] && return 0
72
+
73
+ group " telling Git to consider the repo as safe"
74
+ git config --global --add safe.directory " $REPO_ROOT "
75
+ endgroup
76
+ }
77
+
68
78
get_commit_time () {
69
79
TZ=UTC0 git log -1 \
70
80
--format=' tformat:%cd' \
You can’t perform that action at this time.
0 commit comments