-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
104 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# See documentation | ||
# | ||
# http://goreleaser.com | ||
# | ||
# Usage: | ||
# | ||
# GIT_SUMMARY=$(git describe --tags --dirty --always) goreleaser | ||
# | ||
project_name: run | ||
env: | ||
- GO111MODULE=on | ||
before: | ||
hooks: | ||
- go mod tidy | ||
# - go generate ./... | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
binary: run | ||
ldflags: | ||
- -s -w -X "main.Version={{.Version}}" -X "main.BuildDate={{.Date}}" -X "main.GitSummary={{.Env.GIT_SUMMARY}}" -X "main.BuildTool=goreleaser" | ||
goos: | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
amd64: x86_64 | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}" | ||
changelog: | ||
sort: | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
release: | ||
draft: true | ||
github: | ||
owner: TekWizely | ||
name: run | ||
brews: | ||
- name: run | ||
github: | ||
owner: TekWizely | ||
name: run | ||
|
||
# Git author used to commit to the repository. | ||
# Defaults are shown. | ||
commit_author: | ||
name: TekWizely | ||
email: TekWize.ly@gmail.com | ||
|
||
# Folder inside the repository to put the formula. | ||
# Default is the root folder. | ||
folder: Formula | ||
|
||
# Your app's homepage. | ||
# Default is empty. | ||
homepage: "https://github.com/TekWizely/run" | ||
|
||
# Your app's description. | ||
# Default is empty. | ||
description: "Easily manage and invoke small scripts and wrappers" | ||
|
||
# Setting this will prevent goreleaser to actually try to commit the updated | ||
# formula - instead, the formula file will be stored on the dist folder only, | ||
# leaving the responsibility of publishing it to the user. | ||
# If set to auto, the release will not be uploaded to the homebrew tap | ||
# in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 | ||
# Default is false. | ||
skip_upload: true | ||
|
||
# Packages your package depends on. | ||
dependencies: | ||
- go | ||
|
||
# So you can `brew test` your formula. | ||
# Default is empty. | ||
test: | | ||
text = "Hello Homebrew!" | ||
task = "hello" | ||
(testpath/"Runfile").write <<~EOS | ||
#{task}: | ||
echo #{text} | ||
EOS | ||
assert_equal text, shell_output("#{bin}/#{name} #{task}").chomp | ||
# Custom install script for brew. | ||
# Default is 'bin.install "program"'. | ||
install: | | ||
system "go", "build", "-trimpath", "-ldflags", "-w -s -X main.BuildTool=brew via tekwizely/tap/run", "-o", bin/name |