-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
33 lines (26 loc) · 747 Bytes
/
build.sh
File metadata and controls
33 lines (26 loc) · 747 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
# Check and install Wails
if ! command -v wails &> /dev/null; then
echo "Installing Wails..."
go install github.com/wailsapp/wails/v2/cmd/wails@latest
export PATH="$PATH:$(go env GOPATH)/bin"
fi
# Create output directory
mkdir -p bin
# Build CLI version
cd cmd/cli
go build -o ../../bin/passwordmanager
cd ../..
# Build GUI version
cd cmd/gui
wails build
cd ../..
# Copy the GUI executable to the bin directory
cp cmd/gui/build/bin/passwordmanager-gui bin/
# Clean up build artifacts
echo "Cleaning up build artifacts..."
rm -rf cmd/gui/build
rm -rf cmd/gui/frontend/wailsjs
echo "Build completed. Executables are located in the bin directory:"
echo "- CLI: bin/passwordmanager"
echo "- GUI: bin/passwordmanager-gui"