I try to write a private homebrew tap for gitlab thanks to this article: https://wheniwork.engineering/creating-a-private-homebrew-tap-with-gitlab-8800c453d893
Here is my formula:
class Pouet < Formula
desc "Pouet command line utility"
homepage "https://gitlab.mycompany.com/martin/Pouet"
url "https://gitlab.mycompany.com/api/v4/projects/0000017/repository/archive?private_token=#{ENV['HOMEBREW_GITLAB_TOKEN']}"
version "1.0"
sha256 "ffdb029ada6d03fe3fa323577693cc233ef3d2300784a8d79077cecf6df7a470"
def install
system "echo", ENV["HOMEBREW_GITLAB_TOKEN"]
end
test do
pouet --help
end
end
I defined HOMEBREW_GITLAB_TOKEN in my environment so it is accessible from the shell from which I launch the brew command.
Unfortunately the download fails because the HOMEBREW_GITLAB_TOKEN variable is not known from the brew process.
Any idea?