Autobuild-Go is a command-line tool designed to automate the testing and building of Go projects. It simplifies the process of ensuring that Go
is installed, walking through the project directories, identifying Go projects, and building them.
- Project Discovery: Automatically walks through a directory to find Go projects by locating
main.go
andgo.mod
files. - Go Installation Check: Ensures that Go is installed on the system before running the build process.
- Automated Build: Uses a builder to test and build Go projects, managing output and error handling efficiently.
To install autobuild-go without need of building it from scratch you can use provided releases here: https://github.com/mateuszmierzwinski/autobuild-go/releases
To install Autobuild-Go, you can clone the repository and build the tool using Go.
git clone https://github.com/mateuszmierzwinski/autobuild-go.git
cd autobuild-go
go build -o autobuild-go ./cmd/autobuild-go/
Make sure Go is installed on your system. You can install Go by following the official Go installation guide.
You can run the tool with the following command:
./autobuild-go [path]
path
: (Optional) The root directory you want the tool to scan for Go projects.- If no path is provided, the tool will default to the current directory and scan it for Go projects.
./autobuild-go /path/to/projects
If no path is specified, it will search for Go projects in the current directory:
./autobuild-go
- ProjectWalker: The tool starts by walking through the provided path (or the current directory if none is provided), looking for Go projects by identifying
main.go
and pairing it with the closestgo.mod
file. - GoBuilder: Once projects are identified, the GoBuilder takes over, ensuring Go is installed and running
go build
on each project. - Parallel Processing: The tool is designed to handle multiple projects simultaneously using Go channels and goroutines.
main.go
: Entry point for the tool. Ensures Go installation and initiates the project walking and building process.projectwalker.go
: Contains logic for walking through directories and identifying Go projects.gobuilder.go
: Responsible for testing and building the identified Go projects.processor.go
: Manages the processing pipeline, initiating the project walker and builder.golanginstaller.go
: Ensures Go is installed before proceeding with any build operations.version.go
: Contains versioning information for the tool.
This project is licensed under the BSD 2-Clause License - see the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or fixes.