Init
This commit is contained in:
parent
264c97183e
commit
3faede7b1c
74 changed files with 6228 additions and 1 deletions
17
build.sh
Normal file
17
build.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
COMMIT_HASH=$(git rev-parse --short HEAD)
|
||||
BRANCH_NAME=$(git branch --show-current)
|
||||
|
||||
PACKAGE_PATH="govd/bot/handlers"
|
||||
|
||||
echo "Building with commit hash: ${COMMIT_HASH}"
|
||||
echo "Branch name: ${BRANCH_NAME}"
|
||||
go build -ldflags="-X '${PACKAGE_PATH}.buildHash=${COMMIT_HASH}' -X '${PACKAGE_PATH}.branchName=${BRANCH_NAME}'"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Build completed successfully"
|
||||
else
|
||||
echo "Build failed"
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue