gitsemvers

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 7 Imported by: 9

README

gitsemvers

Test Status codecov.io MIT License PkgGoDev

Description

Retrieve semvers from git tags

Synopsis

sv := &gitsemvers.Semvers{RepoPath: "path/to/repo"}
semvers := sv.VersionStrings()
Monorepo Support

For monorepo projects with prefixed tags (e.g., tools/v1.0.0):

sv := &gitsemvers.Semvers{
    RepoPath:  "path/to/repo",
    TagPrefix: "tools",
}
semvers := sv.VersionStrings() // returns ["tools/v1.1.0", "tools/v1.0.0", ...]

Command Line Tool

% go get github.com/Songmu/gitsemvers/cmd/git-semvers
% git-semvers
v0.9.0
...

Author

Songmu

Documentation

Index

Constants

View Source
const Version = "0.1.0"

Variables

View Source
var Revision = "HEAD"

Functions

This section is empty.

Types

type Semvers

type Semvers struct {
	RepoPath          string
	GitPath           string
	WithPreRelease    bool
	WithBuildMetadata bool
	TagPrefix         string
}

Semvers retrieve semvers from git tags

func (*Semvers) VersionStrings

func (sv *Semvers) VersionStrings() []string

VersionStrings returns version strings

Directories

Path Synopsis
cmd
git-semvers command

Jump to

Keyboard shortcuts

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