gitsemvers

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: MIT Imports: 10 Imported by: 1

README

gitsemvers

Description

Retrieve semvers from git tags

Synopsis

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

Command Line Tool

% go get github.com/vvatanabe/gitsemvers/cmd/git-semvers
% git-semvers
v0.0.1
...

Origin Author

Songmu

Author

vvatanabe

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"`
	VerPrefix         string `          long:"ver-prefix" description:"custom version prefix (ex. foo-1.2.3)"`
}

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