ข้ามไปยังเนื้อหา
AggregaAggregaAggregaAggrega
เลือกภาษา: ไทย
หน้านี้ถูกแปลด้วยเครื่อง อ่านต้นฉบับภาษาอังกฤษ

aggrega version

aggrega version พิมพ์เวอร์ชันของ CLI aggrega

เอาต์พุต

โดยค่าเริ่มต้น aggrega version พิมพ์บรรทัดเวอร์ชันที่มนุษย์อ่านได้

เมื่อใช้ -o json คำสั่งจะส่งออกออบเจ็กต์ที่เครื่องอ่านได้ เยื้องสองช่องว่าง ในรูปทรงเดียวกับที่ทุกคำสั่ง aggrega ใช้กับเอาต์พุต JSON อ่านด้วยตัวแยกวิเคราะห์ JSON ผู้บริโภคที่ใช้การจับคู่ข้อความแทนควรตัดช่องว่างออกก่อนจับคู่ เพราะชื่อฟิลด์คือสัญญา ส่วนเลย์เอาต์โดยรอบไม่ใช่

{
"version": "1.2.3",
"committed": "2026-07-09T18:07:57Z",
"commit": "a1b2c3d",
"abiVersion": "v1beta1",
"goVersion": "go1.23.0",
"platform": "linux/amd64"
}

ฟิลด์มาจากเมทาดาทาการบิลด์ที่ฝังอยู่ในไบนารี committed คือการประทับเวลาของคอมมิต และมีเฉพาะเมื่อการบิลด์บันทึกไว้ abiVersion คือเวอร์ชัน ABI ของปลั๊กอินที่ไบนารีใช้สื่อสาร ซึ่งไปป์ไลน์อ่านได้เพื่อตรวจสอบความเข้ากันได้ของปลั๊กอินโดยไม่ต้องโหลดปลั๊กอิน บิลด์สำหรับพัฒนาที่ไม่มีเวอร์ชันฝังอยู่จะรายงานค่า sentinel (เช่น (devel)) แทนที่จะล้มเหลว

เมื่อใดควรใช้ -o json

  • ส่วนขยายตัวแก้ไขเปรียบเทียบเวอร์ชันที่ daemon รายงานกับเวอร์ชันที่ส่วนขยายถูกบิลด์มาเพื่อใช้ด้วย เพื่อตรวจจับไบนารี aggrega serve ที่เข้ากันไม่ได้ก่อนสั่งงานไบนารีนั้น
  • เครื่องมือ CI และเครื่องมือด้านที่มาบันทึกบิลด์ของคอมไพเลอร์ที่ผลิตอาร์ติแฟกต์นั้นอย่างแม่นยำ

ดูเพิ่มเติม

  • ./aggrega-serve.md — daemon ที่ไคลเอนต์ตรวจสอบเวอร์ชันเพื่อดูความเข้ากันได้

รูปแบบคำสั่ง

aggrega version [flags]

คำอธิบาย

Print the aggrega CLI's build identity.
By default the output is a single human-readable line followed by a
one-line pointer to the plugins compiled into the binary. With
-o json, the output is a structured JSON object suitable for
programmatic consumption (the VS Code extension uses this form to
read the binary's version at activation time), in the same indented
shape every aggrega command's JSON output uses.
With --verbose, the output replaces the pointer line with a table of
the embedded plugins — type, name, served capabilities, and commit —
under a header naming the count and their shared version. With
--verbose -o json, the JSON object gains an embeddedPlugins array
carrying the same detail.
With --licenses, the output is the third-party notices of everything
compiled into the binary: the host and each embedded plugin, every
dependency with its version, license and copyright lines, then each
license text once. It is printed as plain text, so --licenses cannot be
combined with -o json or --verbose.
Version strings are v-less (1.0.0, not v1.0.0), homogeneous with the
version form catalog entities use. Tagged release builds report the
release version, a build stamped with a version reports that version,
and a build carrying no version stamp reports the literal "(devel)",
which marks an unreleased build.

แฟล็ก

แฟล็กค่าเริ่มต้นคำอธิบาย
--licensesfalseพิมพ์ประกาศของบุคคลที่สามสำหรับทุกสิ่งที่คอมไพล์รวมอยู่ในไบนารี
--output, -otextรูปแบบเอาต์พุต: text|json
--verbosefalseรวมชุดปลั๊กอินที่ฝังอยู่ในเอาต์พุต