coreos-ct 0.6.1

Closes #23354.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
Vinyl Darkscratch 2018-01-27 02:13:45 -08:00 committed by ilovezfs
parent 377722623f
commit 9b54dffdc4

25
Formula/coreos-ct.rb Normal file
View file

@ -0,0 +1,25 @@
class CoreosCt < Formula
desc "Convert a Container Linux Config into Ignition"
homepage "https://coreos.com/os/docs/latest/configuration.html"
url "https://github.com/coreos/container-linux-config-transpiler/archive/v0.6.1.tar.gz"
sha256 "57cafa9db08caa6bed0290612bebf5d1a763a96fdb21f23de1681fd266b0c3c3"
depends_on "go" => :build
def install
system "make", "all"
bin.install "./bin/ct"
end
test do
(testpath/"input").write <<~EOS
passwd:
users:
- name: core
ssh_authorized_keys:
- ssh-rsa mykey
EOS
output = shell_output("#{bin}/ct -pretty -in-file #{testpath}/input")
assert_match /.*"sshAuthorizedKeys":\s*["ssh-rsa mykey"\s*].*/m, output.strip
end
end