From f5e1bab6b5a2efc21d3593f349f5f4ff8e0be957 Mon Sep 17 00:00:00 2001 From: meyermarcel Date: Fri, 10 May 2019 15:11:14 +0200 Subject: [PATCH] Add publishing to homebrew repository (#128) --- .travis.yml | 7 +++++++ README.md | 7 +++++++ goreleaser.yml | 16 ++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9c5a255..6a5e90b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,3 +17,10 @@ script: - env GO111MODULE=on go test -v -cover github.com/schollz/croc/v6/src/utils - env GO111MODULE=on go test -v -cover github.com/schollz/croc/v6/src/comm +deploy: + - provider: script + skip_cleanup: true + script: curl -sL https://git.io/goreleaser | bash + on: + tags: true + condition: $TRAVIS_OS_NAME = linux \ No newline at end of file diff --git a/README.md b/README.md index 41e2bd8..4d0e1cf 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,13 @@ $ go get -v github.com/schollz/croc/v6 ``` +Or, on macOS you can install the latest release with [Homebrew](https://brew.sh/): + +``` +$ brew install schollz/tap/croc +``` + + ## Usage diff --git a/goreleaser.yml b/goreleaser.yml index 6d54f6c..79694d8 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -62,3 +62,19 @@ archive: files: - README.md - LICENSE + +brew: + github: + owner: schollz + name: homebrew-tap + folder: Formula + description: "croc is a tool that allows any two computers to simply and securely transfer files and folders." + homepage: "https://schollz.com/software/croc/" + install: | + bin.install "croc" + + dependencies: + - caddy + + test: | + system "#{bin}/croc --version" \ No newline at end of file