* feat: add stable and beta Homebrew channels * fix: align beta formula with tap conventions * fix: use dedicated token for Homebrew PRs * chore: minimize release token permissions * docs: record Homebrew token setup * docs: keep Homebrew automation token long-lived * fix(verify): assert channel versions and prove homebrew coexistence The six-channel verifier previously ran `dws version` without comparing it to the version each channel advertises, so a stale or wrong binary still reported PASS. It also uninstalled stable before installing beta, which could not prove the keg-only beta coexists with stable. - smoke() now takes an expected version and fails the channel on mismatch - npm/homebrew derive the expected version from the package manager; curl/upgrade derive it from the latest GitHub release tag - homebrew installs keg-only beta while stable stays installed, then asserts stable's version, binary SHA and PATH link are unchanged - cleanup uninstalls both script-installed formulae, still refusing to touch a pre-existing user install - add regression tests for version assertion and coexistence semantics * style(formula): satisfy brew style for stable and beta formulae - reword desc so it no longer starts with the formula name - drop the unnecessary `require "fileutils"` and use the mixed-in cp_r instead of the FileUtils. qualifier * fix(verify): compare channel versions exactly * fix(homebrew): keep generated formulae style-clean * fix(homebrew): sync formulae with latest releases
44 lines
1.1 KiB
Cheetah
44 lines
1.1 KiB
Cheetah
class __CLASS_NAME__ < Formula
|
|
desc "Install locally built DingTalk workspace CLI artifacts for verification"
|
|
homepage "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli"
|
|
url "__ARCHIVE_URL__"
|
|
sha256 "__ARCHIVE_SHA256__"
|
|
license "Apache-2.0"
|
|
__KEG_ONLY_LINE__
|
|
|
|
resource "skills" do
|
|
url "__SKILLS_URL__"
|
|
sha256 "__SKILLS_SHA256__"
|
|
end
|
|
|
|
def install
|
|
root = Dir["dws-*"].find { |entry| File.directory?(entry) } || "."
|
|
binary = File.join(root, "dws")
|
|
raise "binary not found: #{binary}" unless File.exist?(binary)
|
|
|
|
bin.install binary => "dws"
|
|
|
|
%w[LICENSE NOTICE README.md CHANGELOG.md].each do |name|
|
|
source = File.join(root, name)
|
|
pkgshare.install source if File.exist?(source)
|
|
end
|
|
|
|
skill_dest = pkgshare/"skills/dws"
|
|
skill_dest.mkpath
|
|
resource("skills").stage do
|
|
cp_r(Dir["*"], skill_dest)
|
|
end
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
Agent Skills are bundled in #{pkgshare}/skills/dws.
|
|
Run `dws skill setup` to install them into your Agent directories.
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
assert_match "dws", shell_output("#{bin}/dws --help")
|
|
end
|
|
end
|