<commit_before>class Mesheryctl < Formula
  desc "Command-line utility for Meshery, the cloud native management plane"
  homepage "https://meshery.io"
  url "https://github.com/meshery/meshery.git",
      tag:      "v0.6.24",
      revision: "76698b1e85c7da92a182b87a1af8dca2dcdf48ff"
  license "Apache-2.0"
  head "https://github.com/meshery/meshery.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_ventura:  "46bdd2578cd0f64c756dba1177a02defb84f7fae6750c09e78a4df20083937e1"
    sha256 cellar: :any_skip_relocation, arm64_monterey: "46bdd2578cd0f64c756dba1177a02defb84f7fae6750c09e78a4df20083937e1"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "46bdd2578cd0f64c756dba1177a02defb84f7fae6750c09e78a4df20083937e1"
    sha256 cellar: :any_skip_relocation, monterey:       "7e7c48a7276e8cf5868ac4895a21b2be8e0ce16b589e434c1f3598120c66e34a"
    sha256 cellar: :any_skip_relocation, big_sur:        "7e7c48a7276e8cf5868ac4895a21b2be8e0ce16b589e434c1f3598120c66e34a"
    sha256 cellar: :any_skip_relocation, catalina:       "7e7c48a7276e8cf5868ac4895a21b2be8e0ce16b589e434c1f3598120c66e34a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "1a537615c76414d8a08f9a2e3ad14dbd07d58695970d51cd93ba498e22c0519f"
  end

  depends_on "go" => :build

  def install
    ENV["CGO_ENABLED"] = "0"

    ldflags = %W[
      -s -w
      -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.version=v#{version}
      -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.commitsha=#{Utils.git_short_head}
      -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.releasechannel=stable
    ]

    system "go", "build", *std_go_args(ldflags: ldflags), "./mesheryctl/cmd/mesheryctl"

    generate_completions_from_executable(bin/"mesheryctl", "completion")
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/mesheryctl version 2>&1")
    assert_match "Channel: stable", shell_output("#{bin}/mesheryctl system channel view 2>&1")

    # Test kubernetes error on trying to start meshery
    assert_match "The Kubernetes cluster is not accessible.", shell_output("#{bin}/mesheryctl system start 2>&1", 1)
  end
end<commit_msg>mesheryctl: update 0.6.24 bottle.<commit_after>class Mesheryctl < Formula
  desc "Command-line utility for Meshery, the cloud native management plane"
  homepage "https://meshery.io"
  url "https://github.com/meshery/meshery.git",
      tag:      "v0.6.24",
      revision: "76698b1e85c7da92a182b87a1af8dca2dcdf48ff"
  license "Apache-2.0"
  head "https://github.com/meshery/meshery.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "26799e200cec2e7c6457173f209ef3c6574c06a19115048975b836f6888e5a7f"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "26799e200cec2e7c6457173f209ef3c6574c06a19115048975b836f6888e5a7f"
    sha256 cellar: :any_skip_relocation, monterey:       "500906ad627383785d676e44b6d8c6a4222330c67edf3cb4861d0283eecece9c"
    sha256 cellar: :any_skip_relocation, big_sur:        "500906ad627383785d676e44b6d8c6a4222330c67edf3cb4861d0283eecece9c"
    sha256 cellar: :any_skip_relocation, catalina:       "500906ad627383785d676e44b6d8c6a4222330c67edf3cb4861d0283eecece9c"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "65fb81c11ea34d8fc6570862f2b0b1b7120831988b813843d7f966f8765fcd0f"
  end

  depends_on "go" => :build

  def install
    ENV["CGO_ENABLED"] = "0"

    ldflags = %W[
      -s -w
      -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.version=v#{version}
      -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.commitsha=#{Utils.git_short_head}
      -X github.com/layer5io/meshery/mesheryctl/internal/cli/root/constants.releasechannel=stable
    ]

    system "go", "build", *std_go_args(ldflags: ldflags), "./mesheryctl/cmd/mesheryctl"

    generate_completions_from_executable(bin/"mesheryctl", "completion")
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/mesheryctl version 2>&1")
    assert_match "Channel: stable", shell_output("#{bin}/mesheryctl system channel view 2>&1")

    # Test kubernetes error on trying to start meshery
    assert_match "The Kubernetes cluster is not accessible.", shell_output("#{bin}/mesheryctl system start 2>&1", 1)
  end
end
{'fraction_non_alphanumeric': 0.09953917050691244, 'fraction_numerical': 0.15829493087557603, 'mean_word_length': 5.122708039492243, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2842049', 'n_tokens_mistral': 2140, 'n_tokens_neox': 1780, 'n_words': 253}