From a06fa7566684a76cc3b4c040a474a64b28b25c9d Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Tue, 6 Sep 2016 23:03:58 -0400 Subject: Improving docs and adding contrib instructions Signed-off-by: Dave Henderson --- CONTRIBUTING.md | 8 ++++++++ Makefile | 3 +++ README.md | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..3e2ab3b2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,8 @@ +# Contributing to gomplate + +Thanks for considering a contribution! All contributions are welcome, including +bug reports, bug fixes, new features or even just questions. + +For PRs, please: +- add new tests to cover the new code +- make sure all of the tests pass (`make test`) diff --git a/Makefile b/Makefile index f0045601..f0600991 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,9 @@ $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS)): $(shell find . -type f -name build: $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS)) +test: + $(GO) test -v -race $(PREFIX)/... + gen-changelog: github_changelog_generator --no-filter-by-milestone --exclude-labels duplicate,question,invalid,wontfix,admin diff --git a/README.md b/README.md index 04770025..2aa88d36 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,25 @@ I really like `envsubst` for use as a super-minimalist template processor. But i Gomplate is an alternative that will let you process templates which also include shell-like variables. Also there are some useful built-in functions that can be used to make templates even more expressive. +## Installing + +1. Get the latest `gomplate` for your platform from the [releases](https://github.com/hairyhenderson/gomplate/releases) page +2. Store the downloaded binary somewhere in your path as `gomplate` (or `gomplate.exe` + on Windows) +3. Make sure it's executable (on Linux/macOS) +3. Test it out with `gomplate --help`! + +In other words: + +```console +$ curl -o /usr/local/bin/gomplate https://github.com/hairyhenderson/gomplate/releases/download//gomplate_- +$ chmod 755 /usr/local/bin/gomplate +$ gomplate --help +... +``` + +_Please report any bugs found in the [issue tracker](https://github.com/hairyhenderson/gomplate/issues/)._ + ## Usage The usual and most basic usage of `gomplate` is to just replace environment variables. All environment variables are available by referencing `.Env` (or `getenv`) in the template. -- cgit v1.2.3