github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/Formula/kpt.rb (about)

     1  # Copyright 2019 Google LLC
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #      http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  class Kpt < Formula
    16    desc "Toolkit to manage,and apply Kubernetes Resource config data files"
    17    homepage "https://googlecontainertools.github.io/kpt"
    18    url "https://github.com/GoogleContainerTools/kpt/archive/v1.0.0-beta.21.tar.gz"
    19    sha256 "ceb5f4523bd1f7d5574652d4d97f92f6028d8f59302cd69ba6b3b1fa62e56295"
    20  
    21    depends_on "go" => :build
    22  
    23    def install
    24      ENV["GO111MODULE"] = "on"
    25      system "go", "build", "-ldflags", "-X github.com/GoogleContainerTools/kpt/run.version=#{version}", *std_go_args
    26    end
    27  
    28    test do
    29      assert_match version.to_s, shell_output("#{bin}/kpt version")
    30    end
    31  end