Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces a Makefile for the
opentofu/registry
project, providing a simplified approach to manage and execute core tasks. The current implementation includes basic functionality that will streamline the development workflow and improve project accessibility.Changes
Makefile
to the root directory of theopentofu/registry
project.check-mkcert
: Verify if mkcert is installed locally, a prerequisite for running a secure local environment.create-certificate
: Create a new local certificate if one does not already exist.mod-init
: Initialize go mod to handle dependencies.populate-generated-folder
: Populate the generated folder with required files for the registry.run-server
: Start the server, facilitating quick local development and testing.build-all
: Build all the binaries required for the registry.test
: Run tests for all packages to ensure code integrity and functionality.clean
: Remove generated files and binaries, maintaining a clean workspace.fmt
: Format Go code using Go’s formatting standards.lint
: Run static code analysis to maintain code quality.vet
: Analyze code to detect potential issues.install-tools
: Install required development tools to set up the environment.help
: Display available commands and their descriptions.Usage
To use the Makefile, run the following commands in the project’s root directory:
make build
- Builds the project.make clean
- Cleans up build artifacts.make test
- Runs tests.Please see above for a full list of the supported targets.
Motivation
Adding a Makefile simplifies the process for developers by encapsulating common tasks into single commands. This is a first draft with the essential commands needed to establish a foundation; additional functionality can be incorporated based on project needs and feedback.
Future Enhancements
Feedback
Feedback on the initial targets and structure of this Makefile is very welcome. This is intended as a foundational setup, and suggestions for further improvements or additional targets are highly encouraged.