go 1.19+ is recommended.
Run the following command to set up the go workspace:
make workspace-initTo sync go.work with the current modules, run:
make workspace-updateThe project provides makefile targets for creating hooks and providers.
To contribute a new hook or provider, fork this repository and create a new go module, it will then be discoverable by make workspace-init and make workspace-update.
To automatically create and set up a new provider directory, use the following command (requires jq):
make MODULE_NAME=NAME new-providerTo automatically create and set up a new hook directory, use the following command (requires jq):
make MODULE_NAME=NAME new-hook Note - jq documentation
The release version of the newly added module(hook/provider) is controlled by .release-please-manifest.json.
You can control the versioning of your module by adding an entry with desired initial version(ex:"provider/acme":"0.0.1").
Otherwise, default versioning will start from 1.0.0.
Any published modules must have documentation in their root directory, explaining the basic purpose of the module as well as installation and usage instructions. Instructions for how to develop a module should also be included (required system dependencies, instructions for testing locally, etc).
Any published modules must have reasonable test coverage.
To run tests in all existing go modules, use the command:
make testIt is recommended to include end-to-end (e2e) tests in your provider when possible. If you have dependency services for your e2e tests, make sure to add them as service in the build pipeline.
You can run all tests, including e2e tests using the command:
make e2eThis repo uses Release Please to release packages. Release Please sets up a running PR that tracks all changes for the library components, and maintains the versions according to conventional commits, generated when PRs are merged. Merging the Release Please PR will create a GitHub release with updated library versions.
The GO-SDK should be a peer dependency of your module.