-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump camino-messenger-protocol dependency versions
- add build script
- Loading branch information
Kleonikos Kyriakis
committed
Jan 17, 2024
1 parent
5b4a3b4
commit 8b7dcac
Showing
4 changed files
with
52 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# Set the output binary name | ||
OUTPUT_BINARY="build/bot" | ||
|
||
# Set the main source file | ||
MAIN_SOURCE="cmd/camino-messenger-bot/main.go" | ||
|
||
# Flag to enable debug mode | ||
DEBUG=false | ||
|
||
# Parse command-line arguments | ||
while [[ $# -gt 0 ]]; do | ||
key="$1" | ||
case $key in | ||
-d|--debug) | ||
DEBUG=true | ||
shift | ||
;; | ||
*) | ||
echo "Unknown option: $1" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
# Build the Go application | ||
echo "Building camino-messenger-bot..." | ||
if [ "$DEBUG" = true ]; then | ||
go build -o ${OUTPUT_BINARY} -gcflags "all=-N -l" ${MAIN_SOURCE} | ||
else | ||
go build -o ${OUTPUT_BINARY} ${MAIN_SOURCE} | ||
fi | ||
|
||
|
||
if [ $? -eq 0 ]; then | ||
echo "Build successful!" | ||
else | ||
echo "Build failed." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters