mikku

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: MIT Imports: 17 Imported by: 0

README

mikku

Actions Status Actions Status Release license Go Report Card

mikku is a CLI tool to help version management and Kubernetes manifest updates.

Features

  • Create GitHub releases with bumping Semantic Versioning tag

Installation

From GitHub release

If you use Windows or Linux, replace windows_amd64 or linux_amd64 instead of darwin_amd64.

$ VERSION=1.0.0
$ curl -O -L https://github.com/p1ass/mikku/releases/download/v${VERSION}/mikku_${VERSION}_darwin_amd64.tar.gz
$ tar -zxvf mikku_${VERSION}_darwin_amd64.tar.gz
$ chmod a+x mikku
$ mv mikku /usr/local/bin/mikku
$ mikku --help

Binaries are available on GitHub releases. p1ass/mikku/releases

go get
$ GO111MODULE=off go get github.com/p1ass/mikku/cmd/mikku
$ mikku --help

Getting Started

Prepare GitHub access token

You need an OAuth2 access token. Generate personal API token with repo scope.

Set environment variable
  • MIKKU_GITHUB_ACCESS_TOKEN: your OAuth2 access token.
  • MIKKU_GITHUB_OWNER: repository owner or org name.
    • Ex. p1ass when p1ass/mikku
$ export MIKKU_GITHUB_ACCESS_TOKEN=[YOUR_ACCESS_TOKEN]
$ export MIKKU_GITHUB_OWNER=[GITHUB_OWNER_NAME]
Create a new GitHub release to bump patch version

When the latest tag name is v1.2.3, the below command bump to v1.2.4.

$ mikku release sample-repository patch

Note that mikku doesn't build and push a docker image, so you have to do it using CI service such as CircleCI.

Screenshots

Release
$ mikku release sample-repository v1.0.0

changelog

Commands

mikku release <repository> <major | minor | patch | (version)>

Create a tag and a GitHub release. If you use major, minor, or patch, the latest tag name must be compatible with Semantic Versioning.

Arguments
  • major : major version up
  • minor : minor version up
  • path : patch version up
  • version : create tag with a given version. Ex. v1.0.0
Examples
$ mikku release sample-repository v1.0.0
$ mikku release sample-repository patch # v1.0.0 → v1.0.1
$ mikku release sample-repository minor # v1.0.1 → v1.1.0
$ mikku release sample-repository major # v1.1.0 → v2.0.0

For developers

Build
$ go build -o mikku cmd/mikku/main.go
Tests
go test -v ./...

LICENCE

MIT

Documentation

Overview

Package mikku is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Release added in v0.1.0

func Release(repo string, bumpTyp string) error

Release is the entry point of `mikku release` command

func Run added in v0.1.1

func Run(args []string) error

Run runs commands depending on the given argument

Types

type Config

type Config struct {
	GitHubAccessToken string `envconfig:"MIKKU_GITHUB_ACCESS_TOKEN" required:"true"`
	GitHubOwner       string `envconfig:"MIKKU_GITHUB_OWNER" required:"true"`
}

Config represents config using all commands

type MockgitHubPullRequestsClient added in v0.1.0

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

MockgitHubPullRequestsClient is a mock of gitHubPullRequestsClient interface

func NewMockgitHubPullRequestsClient added in v0.1.0

func NewMockgitHubPullRequestsClient(ctrl *gomock.Controller) *MockgitHubPullRequestsClient

NewMockgitHubPullRequestsClient creates a new mock instance

func (*MockgitHubPullRequestsClient) Create added in v0.1.0

Create mocks base method

func (*MockgitHubPullRequestsClient) EXPECT added in v0.1.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockgitHubPullRequestsClient) List added in v0.1.0

List mocks base method

type MockgitHubPullRequestsClientMockRecorder added in v0.1.0

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

MockgitHubPullRequestsClientMockRecorder is the mock recorder for MockgitHubPullRequestsClient

func (*MockgitHubPullRequestsClientMockRecorder) Create added in v0.1.0

func (mr *MockgitHubPullRequestsClientMockRecorder) Create(ctx, owner, repo, pull interface{}) *gomock.Call

Create indicates an expected call of Create

func (*MockgitHubPullRequestsClientMockRecorder) List added in v0.1.0

func (mr *MockgitHubPullRequestsClientMockRecorder) List(ctx, owner, repo, opt interface{}) *gomock.Call

List indicates an expected call of List

type MockgitHubRepositoriesClient added in v0.1.0

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

MockgitHubRepositoriesClient is a mock of gitHubRepositoriesClient interface

func NewMockgitHubRepositoriesClient added in v0.1.0

func NewMockgitHubRepositoriesClient(ctrl *gomock.Controller) *MockgitHubRepositoriesClient

NewMockgitHubRepositoriesClient creates a new mock instance

func (*MockgitHubRepositoriesClient) CreateRelease added in v0.1.0

CreateRelease mocks base method

func (*MockgitHubRepositoriesClient) EXPECT added in v0.1.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockgitHubRepositoriesClient) GetLatestRelease added in v0.1.0

func (m *MockgitHubRepositoriesClient) GetLatestRelease(ctx context.Context, owner, repo string) (*github.RepositoryRelease, *github.Response, error)

GetLatestRelease mocks base method

type MockgitHubRepositoriesClientMockRecorder added in v0.1.0

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

MockgitHubRepositoriesClientMockRecorder is the mock recorder for MockgitHubRepositoriesClient

func (*MockgitHubRepositoriesClientMockRecorder) CreateRelease added in v0.1.0

func (mr *MockgitHubRepositoriesClientMockRecorder) CreateRelease(ctx, owner, repo, release interface{}) *gomock.Call

CreateRelease indicates an expected call of CreateRelease

func (*MockgitHubRepositoriesClientMockRecorder) GetLatestRelease added in v0.1.0

func (mr *MockgitHubRepositoriesClientMockRecorder) GetLatestRelease(ctx, owner, repo interface{}) *gomock.Call

GetLatestRelease indicates an expected call of GetLatestRelease

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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