Skip to content

Commit d2ba49e

Browse files
committed
feat: include script to compile installer
1 parent 0e6f153 commit d2ba49e

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

installer/build.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
set -e # Exit on error
4+
5+
# ============================================
6+
# CONFIGURATION - Edit these values
7+
# ============================================
8+
DEFAULT_BRANCH="prod"
9+
INSTALLER_VERSION="v11.0.0-dev.1"
10+
CM_ENCRYPT_SALT="your-encryption-salt-here"
11+
CM_SIGN_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----
12+
your-public-key-here
13+
-----END PUBLIC KEY-----"
14+
15+
# ============================================
16+
# Build Process
17+
# ============================================
18+
19+
# Change to installer directory
20+
cd "$(dirname "${BASH_SOURCE[0]}")"
21+
22+
# Set Go environment variables (same as GitHub Actions)
23+
export GOOS=linux
24+
export GOARCH=amd64
25+
export GOPRIVATE=github.com/utmstack
26+
export GONOPROXY=github.com/utmstack
27+
export GONOSUMDB=github.com/utmstack
28+
29+
echo "Building V11 Installer for production release"
30+
31+
# Execute build with ldflags
32+
go build -o installer -v -ldflags "\
33+
-X 'github.com/utmstack/UTMStack/installer/config.DEFAULT_BRANCH=${DEFAULT_BRANCH}' \
34+
-X 'github.com/utmstack/UTMStack/installer/config.INSTALLER_VERSION=${INSTALLER_VERSION}' \
35+
-X 'github.com/utmstack/UTMStack/installer/config.REPLACE=${CM_ENCRYPT_SALT}' \
36+
-X 'github.com/utmstack/UTMStack/installer/config.PUBLIC_KEY=${CM_SIGN_PUBLIC_KEY}'" \
37+
.
38+
39+
echo "✅ Build completed: ./installer"

0 commit comments

Comments
 (0)