Reorganized project structure and exported main.go to root. Unfortunately, wails framework enforces project layout as it doesn't expose any configuration to allow changing entrypoint.
Updated CD pipeline
Used goreleaser-pro split build feature to configure parallel multi-OS build. It's best to build on native OS when wails UI is being embedded into the binary.
Updated GitHub action to support new configuration
Updated local makefile targets to simplify development
make build-cli - builds CLI binary for the host OS without embedded UI
make build-cli-ui - builds CLI binary for the host OS with embedded UI
make run-web - runs dev env for the UI
make generate-bindings - generates frontend bindings for public Go methods provided as part of the app configuration. They are generated in pkg/ui/web/wailsjs directory
Updated Dockerfiles to not include UI into the binary during build and build from root dir
Used a conditional build to only embed the UI when ui tag is provided for the go build
Bootstraped the UI react project similar to our other projects. It's in pkg/ui/web directory
Fixed an issue with CLI docker container not working due to missing permissions to run the CLI binary
UI offers an application installer wizard similar to both plural app and console
Added a new subcommand plural install that opens an embedded UI
Architecture support
In general embedded UI will only be available for below architectures:
linux/amd64
windows/amd64
darwin/amd64
darwin/arm64
Other supported architectures (linux/arm64 and windows/arm64) and docker images will not have embedded UI.
Test Plan
Locally and partially via GitHub action that stored output binaries for different architectures. I was able to test them on both windows/linux and with help of @maciaszczykm on M1 macOS.
Checklist
[ ] If required, I have updated the Plural documentation accordingly.
[ ] I have added tests to cover my changes.
[ ] I have added a meaningful title and summary to convey the impact of this PR to a user.
[ ] I have added relevant labels to this PR to help with categorization for release notes.
Summary
main.go
to root. Unfortunately, wails framework enforces project layout as it doesn't expose any configuration to allow changing entrypoint.goreleaser-pro
split build feature to configure parallel multi-OS build. It's best to build on native OS when wails UI is being embedded into the binary.make build-cli
- builds CLI binary for the host OS without embedded UImake build-cli-ui
- builds CLI binary for the host OS with embedded UImake run-web
- runs dev env for the UImake generate-bindings
- generates frontend bindings for public Go methods provided as part of the app configuration. They are generated inpkg/ui/web/wailsjs
directoryui
tag is provided for the go buildpkg/ui/web
directoryplural install
that opens an embedded UIArchitecture support
In general embedded UI will only be available for below architectures:
linux/amd64
windows/amd64
darwin/amd64
darwin/arm64
Other supported architectures (
linux/arm64
andwindows/arm64
) and docker images will not have embedded UI.Test Plan
Locally and partially via GitHub action that stored output binaries for different architectures. I was able to test them on both windows/linux and with help of @maciaszczykm on M1 macOS.
Checklist