First: if you're unsure or afraid of anything, just ask or submit the issue or pull request anyways. You won't be yelled at for giving your best effort. The worst that can happen is that you'll be politely asked to change something. We appreciate any sort of contributions, and don't want a wall of rules to get in the way of that.
However, for those individuals who want a bit more guidance on the best way to contribute to the project, read on. This document will cover what we're looking for. By addressing all the points we're looking for, it raises the chances we can quickly merge or address your contributions.
-
Make sure you test against the latest released version. It is possible we already fixed the bug you're experiencing.
-
Provide a reproducible test case. If a contributor can't reproduce an issue, then it dramatically lowers the chances it'll get fixed. And in some cases, the issue will eventually be closed.
-
Respond promptly to any questions made by the maintainers of this project. Stale issues will be closed.
- General guideline is to read some at the golang page Effective Go.
- Be sure to run gofmt before you contribute.
Please send a GitHub Pull Request to prometheus-sql with a clear list of what you've done (read more about pull requests).
This section describes how you build prometheus-sql distribution packages.
-
Build prometheus-sql packages for several platforms:
Using Make:
make prepare dist
Using Docker:
docker run --rm -v ${PWD}:/go/bin -v ${PWD}:/usr/src/myapp -w /usr/src/myapp golang:1.8 bash -c 'apt-get update && apt-get -y install zip && make prepare dist'
-
All binaries produced are now located in directories under the
dist
directory.
-
Go to the project root directory.
-
Build Docker image:
Using Docker (require Docker v17.06 or later):
docker build --rm --no-cache --tag dbhi/prometheus-sql:latest --file Dockerfile.multi .
-
Done!