From b1ccfbc6c2fa88aa30a6f1a65e24b1d32cdda18b Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 10 Dec 2017 14:59:26 -0200 Subject: [PATCH 1/4] chore: checking markdown with prettier/prettier So they are all equally formated --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6e9b26001..79ac0fa76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,13 @@ services: install: - make setup - gem install fpm + - npm install -g prettier - sudo apt-get update - sudo apt-get install --yes snapd rpm - export PATH=/snap/bin:$PATH - sudo snap install snapcraft --candidate --classic script: + - find . -name '*.md' | grep -v vendor | xargs prettier -l || exit 1 - make ci - test -n "$TRAVIS_TAG" || go run main.go --skip-validate --skip-publish after_success: From d7da2c295abb9e9342a5d16188d63896bd6aa9f9 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 10 Dec 2017 15:06:56 -0200 Subject: [PATCH 2/4] chore: checking markdown with prettier/prettier So they are all equally formated --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 79ac0fa76..3562dcf61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ install: - export PATH=/snap/bin:$PATH - sudo snap install snapcraft --candidate --classic script: - - find . -name '*.md' | grep -v vendor | xargs prettier -l || exit 1 + - find . -name '*.md' | grep -v vendor | xargs prettier -l || { echo files above are not formatted with prettier/prettier; exit 1; } - make ci - test -n "$TRAVIS_TAG" || go run main.go --skip-validate --skip-publish after_success: From 5345aadd0de7caa5e98127f7e3c7c9c0597dc21e Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 10 Dec 2017 15:17:29 -0200 Subject: [PATCH 3/4] docs: formatted all docs Based on prettier/prettier --- .github/ISSUE_TEMPLATE.md | 8 +++----- .github/PULL_REQUEST_TEMPLATE.md | 17 ++++++++--------- .travis.yml | 1 - CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 4 ---- LICENSE.md | 2 +- Makefile | 2 ++ README.md | 1 - docs/000-introduction.md | 23 +++++++++++++++++++---- docs/010-quick-start.md | 6 +++--- docs/020-environment.md | 3 +-- docs/120-homebrew.md | 2 +- docs/125-artifactory.md | 20 ++++++++++---------- docs/999-links.md | 10 +++++----- 14 files changed, 54 insertions(+), 47 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 129ea363c..3b8915e5a 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -13,10 +13,9 @@ For more information, see the `CONTRIBUTING` guide. Please paste the output of: -- `go version` -- `uname -a` -- `goreleaser --debug` - +* `go version` +* `uname -a` +* `goreleaser --debug` ### Steps to Reproduce @@ -27,4 +26,3 @@ Please paste the output of: **Expected behavior:** [What you expected to happen] **Actual behavior:** [What actually happened] - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7c7cde2b9..25e1dd0c4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,12 +2,11 @@ -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to change) -- [ ] I have read the **CONTRIBUTING** document. -- [ ] `make ci` passes on my machine. -- [ ] My change requires a change to the documentation. -- [ ] I have updated the documentation accordingly. -- [ ] I have added tests to cover my changes. - +* [ ] Bug fix (non-breaking change which fixes an issue) +* [ ] New feature (non-breaking change which adds functionality) +* [ ] Breaking change (fix or feature that would cause existing functionality to change) +* [ ] I have read the **CONTRIBUTING** document. +* [ ] `make ci` passes on my machine. +* [ ] My change requires a change to the documentation. +* [ ] I have updated the documentation accordingly. +* [ ] I have added tests to cover my changes. diff --git a/.travis.yml b/.travis.yml index 3562dcf61..c97dd2e7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,6 @@ install: - export PATH=/snap/bin:$PATH - sudo snap install snapcraft --candidate --classic script: - - find . -name '*.md' | grep -v vendor | xargs prettier -l || { echo files above are not formatted with prettier/prettier; exit 1; } - make ci - test -n "$TRAVIS_TAG" || go run main.go --skip-validate --skip-publish after_success: diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 2380be3fa..fcf20b2cb 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -23,7 +23,7 @@ include: Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or -advances + advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6848e5502..6307de983 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,6 @@ By participating to this project, you agree to abide our [code of conduct](/CODE_OF_CONDUCT.md). - ## Setup your machine `goreleaser` is written in [Go](https://golang.org/). @@ -38,7 +37,6 @@ A good way of making sure everything is all right is running the test suite: $ make test ``` - ## Test your change You can create a branch for your changes and try to build from the source as you go: @@ -55,7 +53,6 @@ $ make ci Which runs all the linters and tests. - ## Create a commit Commit messages should be well formatted. @@ -80,7 +77,6 @@ help others to generate their own changelog. See #284 ``` - ## Submit a pull request Push your branch to your `goreleaser` fork and open a pull request against the diff --git a/LICENSE.md b/LICENSE.md index b1a3ba376..4d46e2df3 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/Makefile b/Makefile index 4d146f808..e374c31ca 100644 --- a/Makefile +++ b/Makefile @@ -26,11 +26,13 @@ cover: test # gofmt and goimports all go files fmt: find . -name '*.go' -not -wholename './vendor/*' | while read -r file; do gofmt -w -s "$$file"; goimports -w "$$file"; done + find . -name '*.md' -not -wholename './vendor/*' | xargs prettier --write .PHONY: fmt # Run all the linters lint: gometalinter --vendor ./... + find . -name '*.md' -not -wholename './vendor/*' | xargs prettier -l .PHONY: lint # Run all the tests and code checks diff --git a/README.md b/README.md index 91892e64c..57607bd9b 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ at https://goreleaser.com [![goreleaser/goreleaser stargazers over time](https://starcharts.herokuapp.com/goreleaser/goreleaser.svg)](https://starcharts.herokuapp.com/goreleaser/goreleaser) - --- Would you like to fix something in the documentation? Feel free to open an [issue](https://github.com/goreleaser/goreleaser/issues). diff --git a/docs/000-introduction.md b/docs/000-introduction.md index 55c808f97..041975073 100644 --- a/docs/000-introduction.md +++ b/docs/000-introduction.md @@ -19,8 +19,23 @@ that and rewrote the whole thing in Go. ## Installing Goreleaser -There are three ways to get going. +There are three ways to get going install GoReleaser: -1. Install Goreleaser via go get (`goreleaser` command will be globally available) `go get github.com/goreleaser/goreleaser` -1. On a Mac use [Homebrew](https://github.com/goreleaser/homebrew-tap). -1. Install directly [from the binaries](https://github.com/goreleaser/goreleaser/releases/latest). +### Using go get + +```sh +go get github.com/goreleaser/goreleaser +``` + +### Using homebrew + +```sh +brew install goreleaser/tap/goreleaser +``` + +> [tap source](https://github.com/goreleaser/homebrew-tap) + +## Manually + +Download your preferred flavor from the [releases page](https://github.com/goreleaser/goreleaser/releases/latest) and install +manually. diff --git a/docs/010-quick-start.md b/docs/010-quick-start.md index e439d446c..7a06cf6ef 100644 --- a/docs/010-quick-start.md +++ b/docs/010-quick-start.md @@ -70,9 +70,9 @@ This configuration will generate `tar` archives, each containing an additional file called `drum-roll.licence.txt`. The archives will be located in the `dist` folder: -- `./dist/drum-roll_windows_64-bit.tar.gz` -- `./dist/drum-roll_macOS_64-bit.tar.gz` -- `./dist/drum-roll_Tux_64-bit.tar.gz` +* `./dist/drum-roll_windows_64-bit.tar.gz` +* `./dist/drum-roll_macOS_64-bit.tar.gz` +* `./dist/drum-roll_Tux_64-bit.tar.gz` Next, you need to export a `GITHUB_TOKEN` environment variable, which should contain a GitHub token with the `repo` scope selected. diff --git a/docs/020-environment.md b/docs/020-environment.md index 9d9cb3399..33f545710 100644 --- a/docs/020-environment.md +++ b/docs/020-environment.md @@ -17,7 +17,6 @@ Here is how to do it with Travis CI: By default, GoReleaser will create its artifacts in the `./dist` folder. If you must, you can change it by setting it in the `.goreleaser.yml` file: - ```yaml # .goreleaser.yml dist: another-folder-that-is-not-dist @@ -25,7 +24,7 @@ dist: another-folder-that-is-not-dist ## Using the `main.version` -GoReleaser always sets a `main.version` *ldflag*. +GoReleaser always sets a `main.version` _ldflag_. You can use it in your `main.go` file: ```go diff --git a/docs/120-homebrew.md b/docs/120-homebrew.md index 133de95f3..b7027c4b3 100644 --- a/docs/120-homebrew.md +++ b/docs/120-homebrew.md @@ -2,7 +2,7 @@ title: Homebrew --- -After releasing to GitHub, GoReleaser can generate and publish a *homebrew-tap* +After releasing to GitHub, GoReleaser can generate and publish a _homebrew-tap_ recipe into a repository that you have access to. The `brew` section specifies how the formula should be created. diff --git a/docs/125-artifactory.md b/docs/125-artifactory.md index b95d7f1f1..0d4923fa7 100644 --- a/docs/125-artifactory.md +++ b/docs/125-artifactory.md @@ -7,7 +7,7 @@ GoReleaser supports building and pushing artifacts into Artifactory. ## How it works -You can declare multiple Artifactory instances. +You can declare multiple Artifactory instances. All binaries generated by your `builds` section will be pushed to each configured Artifactory. @@ -24,8 +24,8 @@ artifactories: Prerequisites: -- A running Artifactory instances -- A user + password / API key with grants to upload an artifact +* A running Artifactory instances +* A user + password / API key with grants to upload an artifact ### Target @@ -45,14 +45,14 @@ http://artifacts.company.com:8081/artifactory/example-repo-local/goreleaser/1.0. Support variables: -- Version -- Tag -- ProjectName -- Os -- Arch -- Arm +* Version +* Tag +* ProjectName +* Os +* Arch +* Arm -*Attention*: Variables _Os_, _Arch_ and _Arm_ are only supported in upload mode `binary`. +_Attention_: Variables _Os_, _Arch_ and _Arm_ are only supported in upload mode `binary`. ### Password / API Key diff --git a/docs/999-links.md b/docs/999-links.md index d39753f40..b31c62424 100644 --- a/docs/999-links.md +++ b/docs/999-links.md @@ -2,11 +2,11 @@ title: Links --- -- Follow the progress on the [GitHub repository](https://github.com/goreleaser/goreleaser) -- Follow [@caarlos0](https://twitter.com/caarlos0) on Twitter for updates -- [Slack](https://gophers.slack.com/messages/goreleaser/) to chat about GoReleaser, -questions, etc. Join using [this link](https://invite.slack.golangbridge.org/) -- [Contributing Guidelines](https://github.com/goreleaser/goreleaser/blob/master/CONTRIBUTING.md) +* Follow the progress on the [GitHub repository](https://github.com/goreleaser/goreleaser) +* Follow [@caarlos0](https://twitter.com/caarlos0) on Twitter for updates +* [Slack](https://gophers.slack.com/messages/goreleaser/) to chat about GoReleaser, + questions, etc. Join using [this link](https://invite.slack.golangbridge.org/) +* [Contributing Guidelines](https://github.com/goreleaser/goreleaser/blob/master/CONTRIBUTING.md) This project adheres to the Contributor Covenant [code of conduct](https://github.com/goreleaser/goreleaser/blob/master/CODE_OF_CONDUCT.md). From 10416862623da39210ba672fdf9f96e1158f237c Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 10 Dec 2017 15:18:40 -0200 Subject: [PATCH 4/4] docs: formatted all docs Based on prettier/prettier --- docs/000-introduction.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/000-introduction.md b/docs/000-introduction.md index 041975073..e9975f862 100644 --- a/docs/000-introduction.md +++ b/docs/000-introduction.md @@ -33,7 +33,8 @@ go get github.com/goreleaser/goreleaser brew install goreleaser/tap/goreleaser ``` -> [tap source](https://github.com/goreleaser/homebrew-tap) +> Check the [tap source](https://github.com/goreleaser/homebrew-tap) for +> more details. ## Manually