devtools

package module
v0.0.0-...-48c42a0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 16 Imported by: 0

README

Developer tools for version software artifacts

This repository contains several tools for handling meta data and artifacts produced by software development activities.

The general idea is to produce both libraries for development artifact handling and also tools that can be invoked to perform administrative functions related to software release and build activities.

With the advent of the new github.com/karlmutch/duat (developer utilities and tools) project the dump-ver tool is being replaced with facilicities offered within the duat project.

bump-ver

A version bumping tool for storing and manipuating the semantic version within files that contain a HTML formatted version tag.

This tool also has the ability to generate version string using git branch names when the pre command is used.

This tool applies the Semantic Versioning 2.0 spec to version strings in files, https://semver.org/. When the pre command is used the version bumping will append to the version string an increasing pre-release string that can be used to sort the versions creating precedence for versions when they are used with containers or other assets.

Version : 0.1.0

Installation

This go can installed using the following command:

$ go get -u karlmutch/bump-ver

Basic usage

bump-ver by default will read your README.md file and will examine it for HTML markup embeeded in the file <repo-version>[semver]</repo-version>. The text within the tag will be parsed and validated as being valid semver, if this fails the command will exit. Once parsed the options specified on the bump-ver command line will be used to morph the version and written back into the file.

bump-ver can also be used with the apply option to modify files based upon the version within an authorative file. When this option is used not changes are made to the existing input file. This command is only for propagating an existing version to other files.

bump-ver will output to stdout the new version number, except for the apply command where you will get the current version applies to the target-file list.

The command has the following usage:

Bump Version Tag

Usage:

bump-ver [major | major | minor | pre | extract | apply] [-f=] [-t=[,...]]

Options: -h --help Show this message. -version Show the version of this software. -f= A file containing an HTML repo-version tag to be morped or queried [default: README.md] -t=,... A comma seperated list of files that will be examined for version tags and modified based upon the input-file version

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitInfo

type GitInfo struct {
	URL    string          // The URL of the main git remote being used
	Repo   *git.Repository // A handle to the srd-d git object
	Dir    string          // The directory that is being used as the repository root directory
	Branch string          // The current branch the repo is checkedout against
	Tag    string          // The tag for the current commit if present
	Err    errors.Error    // If initialization resulted in an error it may have been stored in this variable`
}

type MetaData

type MetaData struct {
	Dockers map[string]docker.Client
	SemVer  *semver.Version
	Git     *GitInfo
}

func (*MetaData) Apply

func (md *MetaData) Apply(files []string) (err errors.Error)

func (*MetaData) Inject

func (md *MetaData) Inject(file string) (err errors.Error)

func (*MetaData) LoadGit

func (md *MetaData) LoadGit(dir string, scanParents bool) (err errors.Error)

func (*MetaData) LoadVer

func (md *MetaData) LoadVer(fn string) (ver *semver.Version, err errors.Error)

func (*MetaData) Replace

func (md *MetaData) Replace(fn string, dest string, substitute bool) (err errors.Error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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