Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 2.28 KB

File metadata and controls

48 lines (34 loc) · 2.28 KB

Contributing

Thank you for contributing to diego. Here are some guidelines to help you get started.

Basic steps

  1. Fork the project.
  2. Download your fork to your PC (git clone https://github.com/your_username/diego && cd diego)
  3. Create your feature branch (git checkout -b feat/new-feature)
  4. Make changes and test (make run)
  5. Add them to staging (git add .)
  6. Commit your changes (git commit -m 'feat(import): add support for new-feature')
  7. Push to the branch (git push origin feat/new-feature)
  8. Create new pull request

Commit messages

Conventional Commits messages are welcome but not mandatory, since each pull request will be squashed during the merge process. They are used to automate Semantic Versioning for the releases.

Tests and checks

Execute make run to test and check your changes. If you do not have golangci-lint installed on your system, comment out the golangci-lint run line in the Makefile.

Internals

diego follows the Port and Adapters Architecture (Hexagonal). Refer to commit 3eb8bf8 for an overview of the files that need to be changed to implement support for a new service/file.

Makefile

  • make dev/start/stop/clean/serestore :: see ttybitnik/mkdev
  • make lint :: lint the source code
  • make test :: lint and test the source code
  • make build :: lint, test, and build the binary
  • make run :: lint, test, build, and run the binary
  • make deploy :: lint, test, build, and deploy the application locally
  • make debug :: build the binary for debugging
  • make disclean :: remove artifacts
  • make update :: update module dependencies and call make run
  • make golden :: generate/update golden files using current test results

Generate docs

To automate the process of updating the docs/help and docs/man files, set the DIEGO_GENDOCS environment variable to 1 before building and running the application.

The recommended approach is to temporarily set the variable by using the following command whenever necessary:

DIEGO_GENDOCS=1 make run