gitsemvers

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2022 License: MIT Imports: 10 Imported by: 8

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()

Command Line Tool

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

Author

Songmu

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	OutStream, ErrStream io.Writer
}

CLI is for command line

func (*CLI) Run

func (cli *CLI) Run(argv []string) int

Run the cli

type Semvers

type Semvers struct {
	RepoPath          string `short:"r" long:"repo" default:"." description:"git repository path"`
	GitPath           string `short:"g" long:"git" default:"git" description:"git path"`
	WithPreRelease    bool   `short:"P" long:"with-pre-release" description:"display pre-release versions"`
	WithBuildMetadata bool   `short:"B" long:"with-build-metadata" description:"display build-metadata versions"`
}

Semvers retrieve semvers from git tags

func (*Semvers) VersionStrings

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

VersionStrings returns version strings

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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