Skip to content

Commit

Permalink
Merge pull request #58 from werf/parallel_release_build
Browse files Browse the repository at this point in the history
infra(client): use gox parallel release build tool
  • Loading branch information
distorhead authored Sep 14, 2021
2 parents 92b6bd3 + 9839443 commit 719b315
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@
bin/tests

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
*.out

client/release-build
15 changes: 15 additions & 0 deletions client/scripts/ci/build_release_v2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e

VERSION=$1
if [ -z "$VERSION" ] ; then
echo "Required version argument!" 1>&2
echo 1>&2
echo "Usage: $0 VERSION" 1>&2
exit 1
fi

gox -osarch="linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64" \
-output="release-build/$VERSION/{{.OS}}-{{.Arch}}/trdl" \
-tags="dfrunmount dfssh" \
-ldflags="-s -w -X github.com/werf/trdl/client/pkg/trdl.Version=$VERSION" \
github.com/werf/trdl/client/cmd/trdl
4 changes: 2 additions & 2 deletions trdl.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker_image: golang:1.16.4@sha256:f7a5c5872d4bb68e152be72e4a4bf9a142a47ec2dcbb4074798d4feb6197abd7
docker_image: golang:1.17-alpine@sha256:13919fb9091f6667cb375d5fdf016ecd6d3a5d5995603000d422b04583de4ef9
commands:
- cd client && ./scripts/ci/build_release.sh {{ .Tag }} && cp -a release-build/{{ .Tag }}/* /result
- cd client && ./scripts/ci/build_release_v2.sh {{ .Tag }} && cp -a release-build/{{ .Tag }}/* /result

0 comments on commit 719b315

Please sign in to comment.