Skip to content

Commit

Permalink
Update releases
Browse files Browse the repository at this point in the history
because bazel and google can't go ten seconds without breaking something.
  • Loading branch information
michaeljs1990 committed Jul 2, 2021
1 parent a9aebfe commit bcede76
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ builds=(
"freebsd_amd64"
"darwin_amd64")

releases="release/$(git describe --tags)"
mkdir -p ${releases}

for arch in "${builds[@]}"; do
echo build for $arch
echo ===========================================================================
bazel build --platforms=@io_bazel_rules_go//go/toolchain:$arch //:git-sync
done

releases="release/$(git describe --tags)"
mkdir -p ${releases}
bazel build \
--@io_bazel_rules_go//go/config:static \
--platform_suffix=_$arch \
--platforms=@io_bazel_rules_go//go/toolchain:$arch \
//:git-sync

for arch in "${builds[@]}"; do
cp -f $(pwd)/bazel-bin/${arch}_pure_stripped/git-sync $(pwd)/${releases}/git-sync_$arch
# Not sure how to fix but bazel decided to change this path to something stupid instead of providing
# an easy way to find builds for different platforms.
cp -f $(pwd)/bazel-out/darwin-fastbuild_$arch-*/bin/git-sync_/git-sync $(pwd)/${releases}/git-sync_$arch
done

0 comments on commit bcede76

Please sign in to comment.