Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
DomainForge/scripts/build-release.sh at main · GodSpeedAI/DomainForge · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
GodSpeedAI
DomainForge
Repository navigation
Code
Issues
Pull requests
9
(9)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
DomainForge
/
scripts
/
build-release.sh
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
executable file
·
279 lines (244 loc) · 7.69 KB
main
Breadcrumbs
DomainForge
/
scripts
/
build-release.sh
Copy path
Top
File metadata and controls
Code
Blame
executable file
·
279 lines (244 loc) · 7.69 KB
Raw
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
#!
/usr/bin/env bash
#
build-release.sh - Build release artifacts for current platform
#
Usage: ./scripts/build-release.sh [OPTIONS]
set
-euo pipefail
#
============================================================================
#
Configuration
#
============================================================================
SCRIPT_DIR=
"
$(
cd
"
$(
dirname
"
${BASH_SOURCE[0]}
"
)
"
&&
pwd
)
"
PROJECT_ROOT=
"
$(
cd
"
$SCRIPT_DIR
/..
"
&&
pwd
)
"
#
Colors
RED=
'
\033[0;31m
'
GREEN=
'
\033[0;32m
'
YELLOW=
'
\033[1;33m
'
BLUE=
'
\033[0;34m
'
NC=
'
\033[0m
'
#
Flags
DRY_RUN=false
SKIP_CLI=false
SKIP_PYTHON=false
SKIP_WASM=false
#
============================================================================
#
Helper Functions
#
============================================================================
log_info
() {
echo
-e
"
${BLUE}
[INFO]
${NC}
$1
"
;
}
log_success
() {
echo
-e
"
${GREEN}
[✓]
${NC}
$1
"
;
}
log_warn
() {
echo
-e
"
${YELLOW}
[WARN]
${NC}
$1
"
;
}
log_error
() {
echo
-e
"
${RED}
[✗]
${NC}
$1
"
;
}
usage
() {
cat
<<
EOF
Usage:
$(
basename
"
$0
"
)
[OPTIONS]
Build release artifacts for the current platform.
OPTIONS:
--dry-run Show what would be built without building
--skip-cli Skip CLI binary build
--skip-python Skip Python wheel build
--skip-wasm Skip WASM bundle build
-h, --help Show this help message
ARTIFACTS:
- CLI binary (sea or sea.exe)
- Python wheel (.whl)
- WASM bundle (pkg/)
- SHA256 checksums
OUTPUT:
All artifacts placed in dist/ directory
EXAMPLES:
$(
basename
"
$0
"
)
# Build all artifacts
$(
basename
"
$0
"
)
--dry-run # Preview build commands
$(
basename
"
$0
"
)
--skip-wasm # Build CLI and Python only
EOF
}
get_current_version
() {
grep -m1
'
^version =
'
"
$PROJECT_ROOT
/domainforge-core/Cargo.toml
"
|
sed
'
s/version = "\(.*\)"/\1/
'
}
detect_platform
() {
case
"
$(
uname -s
)
"
in
Linux
*
)
echo
"
linux
"
;;
Darwin
*
)
echo
"
darwin
"
;;
CYGWIN
*
|MINGW
*
|MSYS
*
)
echo
"
windows
"
;;
*
)
echo
"
unknown
"
;;
esac
}
detect_arch
() {
case
"
$(
uname -m
)
"
in
x86_64|amd64)
echo
"
x86_64
"
;;
aarch64|arm64)
echo
"
aarch64
"
;;
*
)
echo
"
unknown
"
;;
esac
}
#
============================================================================
#
Parse Arguments
#
============================================================================
while
[[
$#
-gt
0 ]]
;
do
case
$1
in
--dry-run)
DRY_RUN=true
shift
;;
--skip-cli)
SKIP_CLI=true
shift
;;
--skip-python)
SKIP_PYTHON=true
shift
;;
--skip-wasm)
SKIP_WASM=true
shift
;;
-h|--help)
usage
exit
0
;;
*
)
log_error
"
Unknown option:
$1
"
usage
exit
1
;;
esac
done
#
============================================================================
#
Main
#
============================================================================
cd
"
$PROJECT_ROOT
"
echo
"
"
echo
"
==============================================
"
echo
"
DomainForge Release Build
"
echo
"
==============================================
"
echo
"
"
if
$DRY_RUN
;
then
log_warn
"
DRY RUN MODE - No builds will be executed
"
echo
"
"
fi
VERSION=
$(
get_current_version
)
PLATFORM=
$(
detect_platform
)
ARCH=
$(
detect_arch
)
log_info
"
Version:
$VERSION
"
log_info
"
Platform:
$PLATFORM
"
log_info
"
Arch:
$ARCH
"
echo
"
"
#
Clean/create dist directory
DIST_DIR=
"
$PROJECT_ROOT
/dist
"
if
$DRY_RUN
;
then
log_info
"
Would clean/create:
$DIST_DIR
"
else
rm -rf
"
$DIST_DIR
"
mkdir -p
"
$DIST_DIR
"
log_success
"
Created dist directory
"
fi
#
Build CLI
if
!
$SKIP_CLI
;
then
log_info
"
Building CLI binary...
"
if
$DRY_RUN
;
then
log_info
"
Would run: cargo build -p domainforge-core --release --features cli
"
else
cargo build -p domainforge-core --release --features cli
#
Find and copy binary
if
[[
"
$PLATFORM
"
==
"
windows
"
]]
;
then
CLI_BIN=
"
target/release/domainforge.exe
"
CLI_OUT=
"
$DIST_DIR
/sea-
$VERSION
-
$PLATFORM
-
$ARCH
.exe
"
else
CLI_BIN=
"
target/release/domainforge
"
CLI_OUT=
"
$DIST_DIR
/sea-
$VERSION
-
$PLATFORM
-
$ARCH
"
fi
if
[[
-f
"
$CLI_BIN
"
]]
;
then
cp
"
$CLI_BIN
"
"
$CLI_OUT
"
chmod +x
"
$CLI_OUT
"
log_success
"
Built CLI:
$CLI_OUT
"
#
Create compressed archive
ARCHIVE_NAME=
"
sea-
$VERSION
-
$PLATFORM
-
$ARCH
.tar.gz
"
if
[[
"
$PLATFORM
"
==
"
windows
"
]]
;
then
ARCHIVE_NAME=
"
sea-
$VERSION
-
$PLATFORM
-
$ARCH
.zip
"
fi
cd
"
$DIST_DIR
"
if
[[
"
$PLATFORM
"
==
"
windows
"
]]
;
then
#
Use zip on Windows
if
command
-v zip
&
>
/dev/null
;
then
zip
"
$ARCHIVE_NAME
"
"
$(
basename
"
$CLI_OUT
"
)
"
else
log_warn
"
zip not found, skipping archive
"
fi
else
tar czf
"
$ARCHIVE_NAME
"
"
$(
basename
"
$CLI_OUT
"
)
"
fi
cd
"
$PROJECT_ROOT
"
log_success
"
Created archive:
$ARCHIVE_NAME
"
else
log_error
"
CLI binary not found at
$CLI_BIN
"
fi
fi
else
log_info
"
Skipping CLI build (--skip-cli)
"
fi
#
Build Python wheel
if
!
$SKIP_PYTHON
;
then
log_info
"
Building Python wheel...
"
if
$DRY_RUN
;
then
log_info
"
Would run: maturin build --release --features python --out dist
"
else
if
command
-v maturin
&
>
/dev/null
;
then
maturin build --release --features python --out
"
$DIST_DIR
"
log_success
"
Built Python wheel in dist/
"
else
log_warn
"
maturin not found, skipping Python wheel
"
log_info
"
Install with: pip install maturin
"
fi
fi
else
log_info
"
Skipping Python build (--skip-python)
"
fi
#
Build WASM
if
!
$SKIP_WASM
;
then
log_info
"
Building WASM bundle...
"
if
$DRY_RUN
;
then
log_info
"
Would run: wasm-pack build --target web --release --features wasm
"
else
if
command
-v wasm-pack
&
>
/dev/null
;
then
cd
domainforge-core
wasm-pack build --target web --release --features wasm
#
Package WASM artifacts
WASM_ARCHIVE=
"
$DIST_DIR
/domainforge-core-wasm-
$VERSION
.tar.gz
"
cd
pkg
tar czf
"
$WASM_ARCHIVE
"
*
cd
"
$PROJECT_ROOT
"
log_success
"
Built WASM:
$WASM_ARCHIVE
"
else
log_warn
"
wasm-pack not found, skipping WASM build
"
log_info
"
Install with: cargo install wasm-pack
"
fi
fi
else
log_info
"
Skipping WASM build (--skip-wasm)
"
fi
#
Generate checksums
if
!
$DRY_RUN
&&
[[
-d
"
$DIST_DIR
"
]]
;
then
log_info
"
Generating checksums...
"
cd
"
$DIST_DIR
"
#
Generate SHA256 checksums
CHECKSUM_FILE=
"
SHA256SUMS.txt
"
rm -f
"
$CHECKSUM_FILE
"
for
file
in
*
;
do
if
[[
-f
"
$file
"
&&
"
$file
"
!=
"
$CHECKSUM_FILE
"
]]
;
then
if
command
-v sha256sum
&
>
/dev/null
;
then
sha256sum
"
$file
"
>>
"
$CHECKSUM_FILE
"
elif
command
-v shasum
&
>
/dev/null
;
then
shasum -a 256
"
$file
"
>>
"
$CHECKSUM_FILE
"
fi
fi
done
cd
"
$PROJECT_ROOT
"
if
[[
-f
"
$DIST_DIR
/
$CHECKSUM_FILE
"
]]
;
then
log_success
"
Generated checksums:
$CHECKSUM_FILE
"
fi
fi
#
Summary
echo
"
"
echo
"
==============================================
"
log_success
"
Build complete
"
echo
"
"
if
!
$DRY_RUN
;
then
log_info
"
Artifacts in
$DIST_DIR
:
"
ls -lh
"
$DIST_DIR
"
2>
/dev/null
||
true
fi
echo
"
==============================================
"
You can’t perform that action at this time.