utils

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2023 Arbaaz Laskar

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BumpMajorVersion added in v0.5.0

func BumpMajorVersion(version string) string

func BumpMinorVersion added in v0.5.0

func BumpMinorVersion(version string) string

func BumpPatchVersion added in v0.5.0

func BumpPatchVersion(version string) string

func ColorizeDiffStat

func ColorizeDiffStat(output string) string

func CommitChanges added in v0.5.0

func CommitChanges(currentVersion, newVersion, commitMessage string) error

func CreateTag added in v0.5.0

func CreateTag(version, message string) error

func CreateTemplateVariables added in v0.4.0

func CreateTemplateVariables(dir, prevTag, newTag, message string) map[string]string

func GetAppDir added in v0.4.0

func GetAppDir() string

func GetCommitOption added in v0.5.0

func GetCommitOption() (bool, error)

func GetConfigFilePath added in v0.4.0

func GetConfigFilePath() string

func GetCurrentVersion added in v0.5.0

func GetCurrentVersion() (string, error)

func GetTagOption added in v0.5.0

func GetTagOption() (bool, error)

func IncrementVersion added in v0.5.0

func IncrementVersion(version string) string

func IsGitRepository

func IsGitRepository(path string) bool

func ParseTemplate added in v0.4.0

func ParseTemplate(template string, variables map[string]string) string

func UpdateChecker added in v0.3.3

func UpdateChecker()

func UpdateConfig added in v0.4.0

func UpdateConfig(updateFunc func(config *Config)) error

func UpdateFiles added in v0.5.0

func UpdateFiles(currentVersion, newVersion string) error

Types

type Config added in v0.4.0

type Config struct {
	Tags struct {
		Messages map[string]string `json:"messages"`
	} `json:"tags"`
	Version     string    `json:"version"`
	LastUpdated time.Time `json:"lastUpdated"`
}

func ReadConfigFile added in v0.4.0

func ReadConfigFile() (Config, error)

Jump to

Keyboard shortcuts

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