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

Commit

Permalink
Add goarm to metrics (closes #567) (#579)
Browse files Browse the repository at this point in the history
* Initial commit

* Remove unrelated UI changes.

* Fix typo
  • Loading branch information
debnil authored Nov 12, 2020
1 parent 10f017f commit 8f4d797
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
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 @@ -577,7 +577,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 "$DYNAMIC_LDFLAGS" -o $BINARY
check_build_result $?
echo "successful"

Expand Down

0 comments on commit 8f4d797

Please sign in to comment.