-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
路42 lines (34 loc) 路 1.19 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
路42 lines (34 loc) 路 1.19 KB
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
#!/usr/bin/env bash
# Build the standalone installer for Windows and Linux.
# Primary output is dist/, and each binary is also mirrored to the app root.
set -euo pipefail
ROOT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"
if [[ $# -gt 1 ]]; then
printf 'Usage: %s [version]\n' "$0" >&2
exit 2
fi
VERSION="${1:-$(git describe --tags --always --dirty)}"
# Names match the default targets in cmd/build-release/main.go.
TARGETS=(
"dasiwa-installer-windows-amd64.exe"
"dasiwa-installer-linux-amd64"
)
DIST_DIR="$ROOT_DIR/dist"
printf 'Building DaSiWa ComfyUI Installer version %s\n' "$VERSION"
go run ./cmd/build-release \
--version "$VERSION" \
--out "$DIST_DIR"
# build-release already mirrors dist/ -> root; do it explicitly here as well so
# the app root always holds up-to-date binaries even if that step is removed.
for name in "${TARGETS[@]}"; do
src="$DIST_DIR/$name"
dst="$ROOT_DIR/$name"
if [[ -f "$src" ]]; then
printf 'Building %s -> %s\n' "$name" "$dst"
cp -f "$src" "$dst"
else
printf 'warning: expected %s was not produced\n' "$src" >&2
fi
done
printf 'Binaries written to %s and %s\n' "$DIST_DIR" "$ROOT_DIR"