Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Add goarm to metrics (closes #567) #579

Merged
merged 5 commits into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var gitHash string
var buildDate string
var env string
var amplitudeAPIKey string
var goarm string

const envRelease = "release"
const envDev = "dev"
Expand Down
2 changes: 1 addition & 1 deletion cmd/trade.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ func runTradeCmd(options inputs) {
env,
runtime.GOOS,
runtime.GOARCH,
"unknown_todo", // TODO DS Determine how to get GOARM.
goarm,
runtime.Version(),
guiVersionFlag,
*options.strategy,
Expand Down
9 changes: 8 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ then
gen_bind_files
echo ""

# cannot set goarm because not accessible (need to figure out a way)
echo -n "compiling ... "
go build -ldflags "$LDFLAGS" -o $OUTFILE
check_build_result $?
Expand Down Expand Up @@ -322,11 +323,17 @@ do
BINARY="$OUTFILE.exe"
fi

DYNAMIC_LDFLAGS=$LDFLAGS
if [[ "$GOARM" != "" ]]
then
DYNAMIC_LDFLAGS = "$DYNAMIC_LDFLAGS -X github.com/stellar/kelp/cmd.goarm=$GOARM"
fi

gen_bundler_json -p $GOOS
gen_bind_files
# compile
echo -n "compiling for (GOOS=$GOOS, GOARCH=$GOARCH, GOARM=$GOARM) ... "
env GOOS=$GOOS GOARCH=$GOARCH GOARM=$GOARM go build -ldflags "$LDFLAGS" -o $BINARY
env GOOS=$GOOS GOARCH=$GOARCH GOARM=$GOARM go build -ldflags "$DYNAMICLDFLAGS" -o $BINARY
debnil marked this conversation as resolved.
Show resolved Hide resolved
check_build_result $?
echo "successful"

Expand Down