Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 87857c2

Browse files
Amin Jamaliebroberson
authored andcommitted
Add release-binaries.bash
Context: cloudfoundry/wg-app-platform-runtime-ci#9 nits: - Remove release.sh and build-all.sh since they are not used Signed-off-by: Brandon Roberson <[email protected]>
1 parent 5c9811f commit 87857c2

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

bin/build-all.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

bin/release-binaries.bash

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -eu
4+
set -o pipefail
5+
6+
function run() {
7+
local arch os output
8+
arch="${1:?Please provide an architecture}"
9+
os="${2:?Please provide an OS}"
10+
version="${3:?Please provide a version}"
11+
output="${4:?Please provide an output directory}"
12+
13+
local binary tarball
14+
binary="rtr-${os}-${arch}"
15+
tarball="${binary}.tgz"
16+
17+
GOARCH="${arch}" GOOS="${os}" \
18+
go build \
19+
-o "${output}/${binary}" \
20+
-ldflags "-X main.version=${version}"
21+
22+
tar -czvf "${output}/${tarball}" -C "${output}" "${binary}"
23+
24+
rm "${output}/${binary}"
25+
}
26+
27+
run "$@"

bin/release.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)