-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild
More file actions
executable file
·33 lines (25 loc) · 924 Bytes
/
Copy pathbuild
File metadata and controls
executable file
·33 lines (25 loc) · 924 Bytes
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
33
#!/bin/bash
# Build script for rayvise-cli
# Builds the binary and installs it to /usr/local/bin
set -e
# Color codes
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
# Version info
VERSION="${VERSION:-dev}"
GIT_COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "Building rayvise-cli..."
go build -ldflags "-X github.com/rayvise/rayvise-cli/cmd.Version=${VERSION} \
-X github.com/rayvise/rayvise-cli/cmd.GitCommit=${GIT_COMMIT} \
-X github.com/rayvise/rayvise-cli/cmd.BuildDate=${BUILD_DATE}" \
-o rayvise
if [ ! -f rayvise ]; then
echo -e "${RED}Error: Build failed - rayvise binary not found${NC}"
exit 1
fi
echo "Installing to /usr/local/bin..."
sudo mv rayvise /usr/local/bin/
echo -e "${GREEN}✓ rayvise installed successfully!${NC}"
echo "Run 'rayvise --help' to get started."