Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
32 lines (23 loc) · 1.09 KB

File metadata and controls

executable file
·
32 lines (23 loc) · 1.09 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# ===========================================================================
# File: build_bb.sh
# Description: usage: ./build_bb.sh [outdir]
# ===========================================================================
# exit when any command fails
set -e
cd "$(dirname "$0")/../"
. ./scripts/build_init.sh
OUTPUT_DIR=$(mkdir_output "$1")
OUTPUT_BINARY=$OUTPUT_DIR/bb
echo "Start building bb ${VERSION}..."
flags="-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.version=${VERSION}'
-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.goversion=$(go version)'
-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.gitcommit=$(git rev-parse HEAD)'
-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")'
-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.builduser=$(id -u -n)'"
# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug information
go build --tags "release" -ldflags "-w -s $flags" -o ${OUTPUT_BINARY} ./backend/bin/bb/main.go
echo "Completed building bb."
echo ""
echo "Printing version..."
${OUTPUT_BINARY} version
Morty Proxy This is a proxified and sanitized view of the page, visit original site.