-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Implement new readme generator #61
Merged
Merged
Changes from 22 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
5c8a14c
Implement new readme generator
osterman 627412f
add a lint method
osterman 2c97a33
clean up target
osterman dd27787
fix contributors
osterman 180128d
fix branch icon
osterman 3ed9165
Update readme
osterman 5a702d4
update descriptions
osterman 03179a8
Generalize includes
osterman 42d6baf
Annotate README.md
osterman c7b28b8
install readme deps
osterman 8f08b02
use tmp
osterman 01127e1
update packages version
osterman 352b9aa
silently run make
osterman da2c2ba
Add additional information
osterman 56034fe
Update sentence
osterman d161d6b
Update language
osterman 306ef35
update readme
osterman 02e8d65
Add release
osterman c621210
Disable readme/lint
osterman 03a0c08
Update readme
osterman 8df1aaf
call it sweetops
osterman 55e0391
call it sweetops
osterman bffd6a5
dynamically calculate year
osterman 94bff78
fix spelling
osterman 42136c6
remove paren
osterman 7d74d30
add support for related section
osterman e48f18a
add support for related section
osterman bb044be
Add license badge
osterman aa5c2c0
license
osterman e864f82
license
osterman 6d8af3b
license
osterman 58585c3
add more branding
osterman 6a132d0
add more branding
osterman 3b30f8a
add more branding
osterman 40001e9
add more branding
osterman 9b38b45
add logo
osterman eed9dbe
drop logo
osterman 53a7067
Add support for terraform-docs
osterman 4c032d6
fix readme
osterman 5ac7e27
fix typo
osterman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
# | ||
# This is the configuration for the `README.md` | ||
# Run `make readme` to rebuild the `README.md` | ||
# | ||
|
||
# Name of this project | ||
name: Build Harness | ||
|
||
# License of this project | ||
license: "APACHE2" | ||
|
||
# Cannonical GitHub repo | ||
github_repo: cloudposse/build-harness | ||
|
||
# Badges to display | ||
badges: | ||
- name: "Build Status" | ||
image: "https://travis-ci.org/cloudposse/build-harness.svg?branch=master" | ||
href: "https://travis-ci.org/cloudposse/build-harness" | ||
- name: "Latest Release" | ||
image: "https://img.shields.io/github/release/cloudposse/build-harness.svg" | ||
href: "https://github.com/cloudposse/build-harness/releases" | ||
- name: "Slack Community" | ||
image: "https://slack.cloudposse.com/badge.svg" | ||
href: "https://slack.cloudposse.com" | ||
|
||
# Short description of this project | ||
description: |- | ||
This `build-harness` is a collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more. | ||
It's designed to work with CI/CD systems such as Travis CI, CircleCI and Jenkins. | ||
|
||
# How to use this project | ||
usage: |- | ||
At the top of your `Makefile` add, the following... | ||
|
||
```make | ||
-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness) | ||
``` | ||
|
||
This will download a `Makefile` called `.build-harness` and include it at run-time. We recommend adding the `.build-harness` file to your `.gitignore`. | ||
|
||
This automatically exposes many new targets that you can leverage throughout your build & CI/CD process. | ||
|
||
Run `make help` for a list of available targets. | ||
|
||
**NOTE:** the `/` is interchangable with the `:` in target names | ||
|
||
# Example usage | ||
examples: |- | ||
Here are some real world examples: | ||
- [`github-authorized-keys`](https://github.com/cloudposse/github-authorized-keys/) - A Golang project that leverages `docker/%`, `go/%`, `travis/%` targets | ||
- [`charts`](https://github.com/cloudposse/charts/) - A collection of Helm Charts that leverages `docker/%` and `helm/%` targets | ||
- [`bastion`](https://github.com/cloudposse/bastion/) - A docker image that leverages `docker/%` and `bash/lint` targets | ||
- [`terraform-null-label`](https://github.com/cloudposse/terraform-null-label/) - A terraform module that leverages `terraform/%` targets | ||
|
||
# How to get started quickly | ||
quickstart: |- | ||
Here's how to get started... | ||
|
||
1. `git clone https://github.com/cloudposse/build-harness.git` to pull down the repository | ||
2. `make init` to initialize the [`build-harness`](https://github.com/cloudposse/build-harness/) | ||
|
||
# Other files to include in this README from the project folder | ||
include: | ||
- "docs/targets.md" | ||
|
||
# Contributors to this project | ||
contributors: | ||
- name: "Erik Osterman" | ||
homepage: "https://github.com/osterman" | ||
avatar: "http://s.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb?s=144" | ||
github: "osterman" | ||
- name: "Igor Rodionov" | ||
homepage: "https://github.com/goruha/" | ||
avatar: "http://s.gravatar.com/avatar/bc70834d32ed4517568a1feb0b9be7e2?s=144" | ||
github: "goruha" | ||
- name: "Andriy Knysh" | ||
homepage: "https://github.com/aknysh/" | ||
avatar: "https://avatars0.githubusercontent.com/u/7356997?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144" | ||
github: "aknysh" | ||
- name: "Konstantin" | ||
homepage: "https://github.com/comeanother/" | ||
avatar: "https://avatars1.githubusercontent.com/u/11299538?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144" | ||
github: "comeanother" | ||
- name: "Sergey" | ||
homepage: "https://github.com/s2504s/" | ||
avatar: "https://avatars1.githubusercontent.com/u/1134449?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144" | ||
github: "s2504s" | ||
- name: "Valeriy" | ||
homepage: "https://github.com/drama17/" | ||
avatar: "https://avatars1.githubusercontent.com/u/10601658?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144" | ||
github: "drama17" | ||
- name: "Vladimir" | ||
homepage: "https://github.com/SweetOps/" | ||
avatar: "https://avatars1.githubusercontent.com/u/26582191?v=4&u=ed9ce1c9151d552d985bdf5546772e14ef7ab617&s=144" | ||
github: "SweetOps" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
## Makefile Targets | ||
``` | ||
Available targets: | ||
|
||
aws/install Install aws cli bundle | ||
bash/lint Lint all bash scripts | ||
chamber/install Install chamber | ||
codefresh/trigger/webhook Trigger a CodeFresh WebHook | ||
docker/build Build docker image | ||
docker/login Login into docker hub | ||
docs/copyright-add Add copyright headers to source code | ||
geodesic/deploy Run a Jenkins Job to Deploy $(APP) with $(CANONICAL_TAG) | ||
git/aliases-update Update git aliases | ||
git/export Export git vars | ||
git/show Show vars | ||
git/submodules-update Update submodules | ||
github/download-private-release Download release from github | ||
github/download-public-release Download release from github | ||
go/build Build binary | ||
go/build-all Build binary for all platforms | ||
go/clean Clean compiled binary | ||
go/clean-all Clean compiled binary and dependency | ||
go/deps Install dependencies | ||
go/deps-build Install dependencies for build | ||
go/deps-dev Install development dependencies | ||
go/fmt Format code according to Golang convention | ||
go/install Install cli | ||
go/lint Lint code | ||
go/test Run tests | ||
go/vet Vet code | ||
helm/chart/build Build chart $CHART_NAME from $CHART_TPL | ||
helm/chart/build-all Build chart $CHART_NAME from $CHART_TPL for all available $SEMVERSIONS | ||
helm/chart/clean Clean chart packages | ||
helm/chart/create Create chart $CHART from starter scaffold | ||
helm/chart/publish Publish chart $CHART_NAME to $REPO_GATEWAY_ENDPOINT | ||
helm/chart/starter/fetch Fetch starter | ||
helm/chart/starter/remove Remove starter | ||
helm/chart/starter/update Update starter | ||
helm/delete/namespace Delete all releases in a namespace as well as the namespace | ||
helm/install Install helm | ||
helm/repo/add Add $REPO_NAME from $REPO_ENDPOINT | ||
helm/repo/add-current Add helm remote dev repos | ||
helm/repo/add-remote Add helm remote repos | ||
helm/repo/build Build repo | ||
helm/repo/clean Clean helm repo | ||
helm/repo/fix-perms Fix repo filesystem permissions | ||
helm/repo/info Show repo info | ||
helm/repo/lint Lint charts | ||
helm/repo/update Update repo info | ||
helm/serve/index Build index for serve helm charts | ||
helm/toolbox/upsert Install or upgrade helm tiller | ||
helmfile/install Install helmfile | ||
help This help screen | ||
jenkins/run-job-with-tag Run a Jenkins Job with $(TAG) | ||
make/lint Lint all makefiles | ||
packages/install Install packages | ||
packages/install/% Install package (e.g. helm, helmfile, kubectl) | ||
packages/uninstall/% Uninstall package (e.g. helm, helmfile, kubectl) | ||
readme Alias for readme/build | ||
readme/build Create README.md by building it from README.yaml | ||
readme/init Create basic minimalistic .README.md template file | ||
readme/lint Verify the `README.md` is up to date | ||
semver/export Export semver vars | ||
semver/show Show | ||
stages/export Export stages vars | ||
template/build Create $OUT file by building it from $IN template file | ||
template/deps Install dependencies | ||
terraform/get-modules Ensure all modules can be fetched | ||
terraform/get-plugins Ensure all plugins can be fetched | ||
terraform/install Install terraform | ||
terraform/lint Lint check Terraform | ||
terraform/validate Basic terraform sanity check | ||
travis/docker-login Login into docker hub | ||
travis/docker-tag-and-push Tag & Push according Travis environment variables | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
export README_LINT ?= $(TMP)/README.md | ||
export README_FILE ?= README.md | ||
export README_TEMPLATE_FILE ?= .$(README_FILE) | ||
export README_YAML ?= README.yaml | ||
export README_TEMPLATE_FILE ?= $(BUILD_HARNESS_PATH)/templates/README.md | ||
export README_TEMPLATE_YAML ?= $(BUILD_HARNESS_PATH)/templates/README.yaml | ||
|
||
## Alias for readme/build | ||
readme: readme/build | ||
@exit 0 | ||
|
||
## Update table of contents in README.md | ||
readme/toc-update: | ||
@doctoc --notitle --github $(README_FILE) | ||
readme/deps: packages/install/gomplate | ||
@exit 0 | ||
|
||
## Create basic minimalistic .README.md template file | ||
readme/init: | ||
@if [ -s ./$(README_TEMPLATE_FILE) ]; then \ | ||
echo "$(README_TEMPLATE_FILE) already exists!"; \ | ||
@if [ -f $(README_YAML) ]; then \ | ||
echo "$(README_YAML) already exists!"; \ | ||
else \ | ||
cp $(BUILD_HARNESS_PATH)/templates/$(README_TEMPLATE_FILE) ./$(README_TEMPLATE_FILE) ; \ | ||
echo "$(README_TEMPLATE_FILE) created!"; \ | ||
cp $(README_TEMPLATE_YAML) $(README_YAML) ; \ | ||
echo "$(README_YAML) created!"; \ | ||
fi; | ||
|
||
## Create README.md by building it from .README.md file | ||
readme/build: | ||
@$(SELF) -s template/build IN=$(README_TEMPLATE_FILE) OUT=$(README_FILE) | ||
## Verify the `README.md` is up to date | ||
readme/lint: | ||
@$(SELF) readme/build README_FILE=$(README_LINT) >/dev/null | ||
@diff -ruN $(README_LINT) $(README_FILE) | ||
@rm -f $(README_LINT) | ||
|
||
## Create README.md by building it from README.yaml | ||
readme/build: $(README_DEPS) | ||
@mkdir -p docs | ||
@gomplate --file $(README_TEMPLATE_FILE) \ | ||
--out $(README_FILE) \ | ||
--datasource config=$(README_YAML) \ | ||
--datasource includes='file://$(shell pwd)/?type=text/plain' | ||
@echo "Generated $(README_FILE) from $(README_TEMPLATE_FILE) using data from $(README_TEMPLATE_YAML)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Canonical