files

package
v0.0.0-...-a398c15 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangesInfo

type ChangesInfo struct {
	Hash           string
	AuthorName     string
	AuthorEmail    string
	Message        string
	CurrentVersion string
	NewVersion     string
	ChangeType     string
}

type CommitMessageManager

type CommitMessageManager interface {
	PrettifyCommitMessage(commitMessage string) (string, error)
}

type ElapsedTime

type ElapsedTime func(functionName string) func()

type FileVersion

type FileVersion struct {
	// contains filtered or unexported fields
}

func New

func New(log Logger, elapsedTime ElapsedTime, versionConrolHost, repositoryRootPath, groupName, projectName string, commitMessageManager CommitMessageManager) *FileVersion

func (*FileVersion) UpgradeChangeLog

func (f *FileVersion) UpgradeChangeLog(path, destinationPath string, chageLogInfo interface{}) error

UpgradeChangelog aims to append the new release version with the commit information to the CHANGELOG.md file.

func (*FileVersion) UpgradeVariableInFiles

func (f *FileVersion) UpgradeVariableInFiles(filesToUpgrade interface{}, newVersion string) error

UpgradeVariableInFiles aims to update given files with the new release version. It will update the files row containing a given variable name. I.e.: err := UpgradeVariableInFiles(UpgradeFiles{Files: []UpgradeFile{{Path: "./setup.py", DestinationPath: "", VariableName: "__version__"}}), "1.0.1")

From: __version__ = 1.0.0
To:   __version__ = 1.0.1

type Logger

type Logger interface {
	Info(s string, args ...interface{})
	Error(s string, args ...interface{})
	Warn(s string, args ...interface{})
}

type UpgradeFile

type UpgradeFile struct {
	Path            string
	DestinationPath string
	VariableName    string
}

type UpgradeFiles

type UpgradeFiles struct {
	Files []UpgradeFile
}

Jump to

Keyboard shortcuts

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