Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Add goreleaser to support Homebrew installation #102

Merged
merged 3 commits into from
Feb 19, 2019
Merged

Add goreleaser to support Homebrew installation #102

merged 3 commits into from
Feb 19, 2019

Conversation

gotchane
Copy link
Contributor

fix #91

Summary

This PR is to support Homebrew tap.

I researched about using Homebrew again, I knew below:

  • It is necessary to set release version to use Homebrew.
  • Using Homebrew tap is easier to follow the latest version than using offitial Homebrew repo.

Sorry for not able to using Homebrew with the latest commit of master branch.. 😢

How to use it

In order to be ready to use this, let me request to @skanehira to do below.

  1. Create the empty GitHub repo named skanehira/homebrew-docui and add empty Formula folder. (My test example: https://github.com/gotchane/homebrew-docui)
  2. Set the Environment variable GITHUB_TOKEN to docui circleci project to use goreleaser.

That's all. When only pushing git tag like 1.0.x at releasing, goreleaser is kicked from circleci, build and set binary releases to GitHub releases and update homebrew tap file.

Any comments and questions are welcome 😃

@skanehira
Copy link
Owner

@gotchane
Thank you PR!
I was looking forward to this PR.

BTY, I have some questions below.

Q1. Can not use repo of skanehira/docui?
Q2. When goreleaser is executed, will Formula/docui.rb be created auto?

@gotchane
Copy link
Contributor Author

@skanehira

Thanks for your comment!

Q1. Can not use repo of skanehira/docui?

Unfortunately, it isn't able to use skanehira/docui for homebrew-tap 😢
It is homebrew-tap's usage rule.
https://docs.brew.sh/Taps#repository-naming-conventions-and-assumptions

ex)
k9s project creates its own homebrew-tap.
https://github.com/derailed/homebrew-k9s

Q2. When goreleaser is executed, will Formula/docui.rb be created auto?

Exactly. At every pushing tags, release binary creates and Formula/docui.rb updates.

@gotchane
Copy link
Contributor Author

@skanehira

Please let me add more information.

The goreleaser document is also helpful to understand how to use goreleaser.
https://goreleaser.com/quick-start/

For example, it is possible to test dry-run by installing goreleaser locally.

$ brew install goreleaser
$ cd /path/to/docui
$ export GITHUB_TOKEN=`YOUR_TOKEN`
$ goreleaser release --skip-publish

@skanehira
Copy link
Owner

@gotchane
OK, I'm understood.
I have one more question.

Q1. GITHUB_TOKEN is mean a Personal access tokens?
https://qiita.com/kz800/items/497ec70bff3e555dacd0

@gotchane
Copy link
Contributor Author

@skanehira

Q1. GITHUB_TOKEN is mean a Personal access tokens?

That's right!
It is necessary to use a valid GitHub personal access token with the repo scope.

cf: https://goreleaser.com/quick-start/

You’ll need to export a GITHUB_TOKEN environment variable, which should contain a valid GitHub token with the repo scope. It will be used to deploy releases to your GitHub repository.

@skanehira skanehira merged commit a00087f into skanehira:master Feb 19, 2019
@skanehira
Copy link
Owner

skanehira commented Feb 19, 2019

@gotchane
understood.
Thank you for tell me!
I merged this.

@gotchane gotchane deleted the add-goreleaser-for-homebrew branch February 19, 2019 14:03
@gotchane
Copy link
Contributor Author

@skanehira
Thanks for merging PR!
If any questions remain, please let me know!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Brew support
2 participants