Skip to content

Instantly share code, notes, and snippets.

@mattmc3 mattmc3/myapp.rb
Created Apr 29, 2019

Embed
What would you like to do?
Homebrew - Tap for private repo
# Homebrew formula for private github repo
# Requires $HOMEBREW_GITHUB_API_TOKEN to be set
# WARNING: This is a cheap way to do this. Don't use this method unless you
# really don't care about the security of you private GH token. And, let's
# be clear - this is for a private GH Enterprise repo, so you might not
# care...
class MyApp < Formula
desc "My fake app"
homepage "https://git.mycompany.com/myteam/myapp"
url "https://#{ENV['HOMEBREW_GITHUB_API_TOKEN']}@git.mycompany.com/group/repo/releases/download/v1.0.0.tar.gz"
sha256 "3c88af48a3bafcda0dd168dfa7efa0a304d9751e316b4b9bad5b65eb29b8f762"
head "https://git.mycompany.com/myteam/myapp.git"
bottle :unneeded
def install
bin.install "myapp"
end
def caveats; <<~EOS
Whatever you want to say here
EOS
end
test do
assert_match "myapp version 1.0.0", shell_output("#{bin}/myapp -v", 2)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.