Skip to content

Commit

Permalink
add --release arg
Browse files Browse the repository at this point in the history
  • Loading branch information
tangowithfoxtrot committed Feb 28, 2024
1 parent 04c8a9b commit c046b53
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion languages/go/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# Usage: ./build.sh [--release]

check_command() {
if ! command -v "$1" &>/dev/null; then
printf '%s\n' "$1 is required to build locally. Please install $2."
Expand All @@ -19,7 +21,13 @@ printf '%s\n\n' "Cleaning old builds..."
rm -f languages/go/example/example && rm -rf "$GO_LIB_DIR"

printf '%s\n\n' "Building binaries..."
cargo build

if [ "$1" = "--release" ]; then
cargo build --release
else
cargo build
fi

npm i && npm run schemas

printf '%s\n\n' "Copying Go bindings to $GO_LIB_DIR..."
Expand Down

0 comments on commit c046b53

Please sign in to comment.