🎉 First off, thanks for taking the time to contribute! 🎉
As any other Golang written binary, revealgo
can be build on different
manners.
This one was already addressed on the README.md file. Basically
what you need is to perform the followings steps to have your local revealgo
binary:
- Clone this repository
- Update git-submodule references
- Either
go build [...]
orgo install [...]
this repository
$ git clone https://github.com/yusukebe/revealgo.git
$ cd revealgo
$ git submodule update --init --recursive
$ go install ./cmd/revealgo
For CI and Release builds another tool, called goreleaser, is used for orchestating the cross-platform binaries management. Assuming you already have said tool in your local environment, a snapshot build can be done by:
- Clone this repository
- Run
goreleaser
build for snapshots using the--snapshot
flag
$ git clone https://github.com/yusukebe/revealgo.git
$ cd revealgo
$ goreleaser build --snapshot --rm-dist
$ tree dist
dist
├── config.yaml
├── revealgo_darwin_amd64
│ └── revealgo
├── revealgo_darwin_arm64
│ └── revealgo
├── revealgo_linux_386
│ └── revealgo
├── revealgo_linux_amd64
│ └── revealgo
├── revealgo_linux_arm_6
│ └── revealgo
├── revealgo_linux_arm64
│ └── revealgo
├── revealgo_windows_386
│ └── revealgo.exe
└── revealgo_windows_amd64
└── revealgo.exe
As mentioned in the section above, this project relies on goreleaser for cross-platform builds, packaging and release.
The release process will be triggered once a new git tag is pushed to GitHub, regardless of the branch it is associated with. The process goes as follows:
- A new git tag is created following semver conventions
- The git tag is pushed to
revealgo
's repository - A GitHub action will take care of the release process:
- Run linting
- Run
goreleaser release --rm-dist
- Publish new release as a draft
Upon success, the maintainer will take care of updating the release information and changing it out from draft mode.
To test the release process locally you can run any of the following commands:
# Run release process WITHOUT checking for unstagged changes and AVOIDING to plublish
$ goreleaser release --rm-dist --skip-validate --skip-publish
# Run FULL release process. Requires the GITHUB_TOKEN env. variable.
# Read more here: https://goreleaser.com/scm/github/
$ goreleaser release --rm-dist