Skip to content

Commit 0ba1b47

Browse files
Fix MacOS Dist (#5)
1 parent b88e957 commit 0ba1b47

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

DistTasks.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,14 @@ tasks:
194194
desc: Builds Mac OS X 64 bit binaries
195195
dir: "{{.DIST_DIR}}"
196196
cmds:
197+
# "git config safe.directory" is required until this is fixed https://github.com/elastic/golang-crossbuild/issues/232
197198
- |
198199
mkdir {{.PLATFORM_DIR}}
199200
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
200201
docker run -v `pwd`/..:/home/build -w /home/build \
201202
-e CGO_ENABLED=1 \
202203
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
203-
--build-cmd "{{.BUILD_COMMAND}}" \
204+
--build-cmd "git config --global --add safe.directory /home/build && {{.BUILD_COMMAND}}" \
204205
-p "{{.BUILD_PLATFORM}}"
205206
206207
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}
@@ -218,13 +219,14 @@ tasks:
218219
desc: Builds Mac OS X ARM64 binaries
219220
dir: "{{.DIST_DIR}}"
220221
cmds:
222+
# "git config safe.directory" is required until this is fixed https://github.com/elastic/golang-crossbuild/issues/232
221223
- |
222224
mkdir {{.PLATFORM_DIR}}
223225
cp ../LICENSE.txt {{.PLATFORM_DIR}}/
224226
docker run -v `pwd`/..:/home/build -w /home/build \
225227
-e CGO_ENABLED=1 \
226228
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
227-
--build-cmd "{{.BUILD_COMMAND}}" \
229+
--build-cmd "git config --global --add safe.directory /home/build && {{.BUILD_COMMAND}}" \
228230
-p "{{.BUILD_PLATFORM}}"
229231
230232
tar cz {{.PLATFORM_DIR}} -f {{.PACKAGE_NAME}}

0 commit comments

Comments
 (0)