tractordev / wanix

Experimental, local-first, web-native, Unix-like development environment
https://wanix.sh
MIT License
205 stars 11 forks source link

cli: bundle command #136

Closed progrium closed 2 months ago

progrium commented 3 months ago

The bundler (dev/bundle.go + make bundle) will become another subcommand of the wanix CLI. It can be put into a command as-is, but it needs to detect if the current working directory is the wanix repo. If not, it needs to clone the repo from GitHub into a temporary directory to continue from there. To eliminate git as a system dependency and to start working with it in preparation for other uses, I want to do this in-process using go-git. It just needs to perform a shallow clone.

It will replace make bundle so it will need to trigger a build and gzip of the kernel in working directory repo. Later we can use an embedded version of our builder, but for now we can leave Go as a system dependency to build the kernel during bundle. It should check if go is found in the PATH and fail if not.

It will place the bootloader, kernel, and initfs files into the current directory if an output dir flag is not set.

progrium commented 2 months ago

The loader command and new approach in #143 makes this issue unnecessary.