Skip to content

Commit

Permalink
Merge pull request #201 from per1234/fix-release-tasks
Browse files Browse the repository at this point in the history
Fix container-related misconfigurations in release build tasks
  • Loading branch information
per1234 authored Nov 13, 2024
2 parents 5444eb5 + a14dd93 commit 1a68dfb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions DistTasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ tasks:
desc: Builds Linux ARMv6 binaries
dir: "{{.DIST_DIR}}"
cmds:
# "git config safe.directory" is required until this is fixed https://github.com/elastic/golang-crossbuild/issues/232
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
--build-cmd "git config --global --add safe.directory /home/build && {{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
Expand Down Expand Up @@ -172,7 +173,7 @@ tasks:
#
# Until there is a fix released we must use a recent gcc for Linux_ARMv6 build, so for this
# build we select the debian10 based container.
CONTAINER_TAG: "{{.GO_VERSION}}-armel-debian10"
CONTAINER_TAG: "{{.GO_VERSION}}-armel-debian11"
PACKAGE_PLATFORM: "Linux_ARMv6"
PACKAGE_NAME: "{{.PROJECT_NAME}}_{{.VERSION}}_{{.PACKAGE_PLATFORM}}.tar.gz"

Expand Down Expand Up @@ -201,11 +202,12 @@ tasks:
desc: Builds Mac OS X 64 bit binaries
dir: "{{.DIST_DIR}}"
cmds:
# "git config safe.directory" is required until this is fixed https://github.com/elastic/golang-crossbuild/issues/232
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
--build-cmd "git config --global --add safe.directory /home/build && {{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
Expand Down Expand Up @@ -235,11 +237,12 @@ tasks:
desc: Builds Mac OS X ARM64 binaries
dir: "{{.DIST_DIR}}"
cmds:
# "git config safe.directory" is required until this is fixed https://github.com/elastic/golang-crossbuild/issues/232
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{.CONTAINER}}:{{.CONTAINER_TAG}} \
--build-cmd "{{.BUILD_COMMAND}}" \
--build-cmd "git config --global --add safe.directory /home/build && {{.BUILD_COMMAND}}" \
-p "{{.BUILD_PLATFORM}}"
tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}}
Expand Down

0 comments on commit 1a68dfb

Please sign in to comment.