buildver

package
v1.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package buildver 计算插件包输入文件的内容指纹,并据此自动递增补丁版本号。

主/次版本仍由人工维护;补丁号只在某个合并包的输入内容发生变化时递增, 因此无需手工修改版本,也不会因为无关改动触发全量重建。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashPaths

func HashPaths(root string, paths []string) (string, error)

HashPaths 计算 root 下给定文件与目录的内容指纹。

目录会递归包含普通文件,忽略测试文件(*_test.go)与 testdata 目录; 结果与输入路径的顺序无关,重复或重叠的路径只计入一次。

func Next

func Next(prevVersion, prevHash, base, newHash string) string

Next 计算插件包的新版本。

  • 新插件:使用基线版本 <base>.0;
  • 首次引入内容指纹(已有 plugins.json 没有 source_hash):保留原版本,避免迁移时误发布;
  • 主/次版本基线变化:使用新的 <base>.0;
  • 输入内容变化:补丁号 +1;
  • 内容未变化:保留原版本。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL