Add build time to scripts

This commit is contained in:
Stu Leak 2026-01-07 13:45:58 -05:00
parent 88bc5ad4d4
commit b868eae686
2 changed files with 9 additions and 0 deletions

View File

@ -50,6 +50,8 @@ fi
echo ""
echo "Building VideoTools..."
# Build timer
build_start=$(date +%s)
# Fyne needs cgo for GLFW/OpenGL bindings; build with CGO enabled.
export CGO_ENABLED=1
export GOCACHE="$PROJECT_ROOT/.cache/go-build"
@ -70,7 +72,10 @@ if [ -n "$GST_TAG" ]; then
export GOFLAGS="${GOFLAGS:-} -tags ${GST_TAG}"
fi
if go build -o "$BUILD_OUTPUT" .; then
build_end=$(date +%s)
build_secs=$((build_end - build_start))
echo "Build successful! (VideoTools $APP_VERSION)"
echo "Build time: ${build_secs}s"
echo ""
echo "════════════════════════════════════════════════════════════════"
echo "BUILD COMPLETE - $APP_VERSION"

View File

@ -49,6 +49,7 @@ case "$OS" in
echo "→ Building VideoTools $APP_VERSION for Windows..."
echo ""
cd "$PROJECT_ROOT"
build_start=$(date +%s)
echo "Cleaning previous builds..."
rm -f VideoTools.exe 2>/dev/null || true
@ -71,7 +72,10 @@ case "$OS" in
export GOFLAGS="${GOFLAGS:-} -mod=mod"
fi
if go build -ldflags="-H windowsgui -s -w" -o VideoTools.exe .; then
build_end=$(date +%s)
build_secs=$((build_end - build_start))
echo "Build successful! (VideoTools $APP_VERSION)"
echo "Build time: ${build_secs}s"
echo ""
if [ -f "setup-windows.bat" ]; then
echo "════════════════════════════════════════════════════════════════"