tf-changelog-validator

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT

README

tf-changelog-validator GoDoc build

Validate your Terraform provider's changelog to prevent release errors.

The main purpose of this validator is to ensure that versions are not erroneously bumped. For instance: skipping a version (1.2.3 -> 1.2.5) or accidentally rolling back a version (1.2.3 -> 1.2.2).

Usage

Install binary with go:

go install github.com/Charliekenney23/tf-changelog-validator/cmd/tf-changelog-validator

CLI usage:

❯ tf-changelog-validator -h                    
Usage:    tf-changelog-validator [OPTIONS]

Validate your Terraform provider's changelog to prevent release errors

Options:
  -repoPath string
    	Path to the Terraform provider's git repository. (default ".")

Run in a docker container:

docker run -v `pwd`:/var/repo:ro charliekenney23/tf-changelog-validator

Programmatic usage:

import "os"
import "github.com/Charliekenney23/tf-changelog-validator/pkg/chlogvalidator"

func main() {
    changelogFile, err := os.Open("./Changelog.md")
    if err != nil {
        panic(err)
    }

    if err := chlogvalidator.Validate(changelogFile); err != nil {
        log.Printf("validation error: %s", err)
    }
}

Directories

Path Synopsis
cmd
internal
pkg
bumpvalidator
Package bumpvalidator provides validation for semver bumps.
Package bumpvalidator provides validation for semver bumps.

Jump to

Keyboard shortcuts

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