Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opentofu registry makefile #1248

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ipolyzos
Copy link

@ipolyzos ipolyzos commented Nov 2, 2024

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

  • Added Makefile to the root directory of the opentofu/registry project.
  • Implemented Basic Targets:
    • 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

  • Support for additional build configurations.
  • Extended testing and linting targets.
  • Docker and deployment-related commands.

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.

…rated binaries from Makefile

Signed-off-by: Ioannis Polyzos <[email protected]>
- Added targets for cleaning, formatting, linting, vetting, and installing tools.
- Ensured the `help` target is the default and excluded the `all` target from the help message.

Signed-off-by: Ioannis Polyzos <[email protected]>
@abstractionfactory abstractionfactory marked this pull request as draft November 3, 2024 06:47
@ipolyzos ipolyzos marked this pull request as ready for review November 3, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a Makefile for streamlined development and maintenance operations in OpenTofu Registry
1 participant