kick

package module
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: BSD-2-Clause-Views Imports: 7 Imported by: 0

README

kick: git sync automator

ABOUT

kick automates a common git workflow:

  1. Stage all local changes.
  2. Commit all local changes.
  3. Pull remote changes and tags.
  4. Push local changes.
  5. Push tags and changes.

EXAMPLE

$ kick

See kick -help for more options.

DOWNLOAD

https://github.com/mcandre/kick/releases

INSTALL FROM SOURCE

$ go install github.com/mcandre/kick/cmd/kick@latest

DOCUMENTATION

https://pkg.go.dev/github.com/mcandre/kick

LICENSE

BSD-2-Clause

RUNTIME REQUIREMENTS

CONFIGURATION

See CONFIGURATION.md.

CONTRIBUTING

For more information on developing buttery itself, see DEVELOPMENT.md.

👟

Documentation

Overview

Package kick provides high level git sync operations.

Index

Constants

View Source
const CommitMessageEnvironmentVariable = "KICK_MESSAGE"

CommitMessageEnvironmentVariable denotes the name of the environment variable controlling commit messages.

View Source
const DefaultCommitMessage = "up"

DefaultCommitMessage denotes a standard commit message.

View Source
const FetchAllEnvironmentVariable = "KICK_FETCH_ALL"

FetchAllEnvironmentVariable denotes the name of the environment variable controlling whether fetches process all remotes.

View Source
const NonceEnvironmentVariable = "KICK_NONCE"

NonceEnvironmentVariable denotes the name of the environment variable controlling nonces.

View Source
const NoncePath = ".kick"

NoncePath denotes the file path to a nonce file, relative to the current working directory.

View Source
const PullAllEnvironmentVariable = "KICK_PULL_ALL"

PullAllEnvironmentVariable denotes the name of the environment variable controlling whether pulls process all remotes.

View Source
const PushAllEnvironmentVariable = "KICK_PUSH_ALL"

PushAllEnvironmentVariable denotes the name of the environment variable controlling whether pushes process all remotes.

View Source
const SyncTagsEnvironmentVariable = "KICK_SYNC_TAGS"

SyncTagsEnvironmentVariable denotes the name of the environment variable controlling whether to push and pull tags.

View Source
const Version = "0.0.8"

Version is semver.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Debug enables additional logging (default: false).
	Debug bool

	// Nonce enables altering NoncePath to generate commits when repositories are otherwise unchanged (default: false).
	Nonce bool

	// FetchAll enables fetching from all remotes (default: true).
	FetchAll bool

	// PullAll enables pulling from all remotes (default: true).
	PullAll bool

	// PushAll enables pushing to all remotes (default: true).
	PushAll bool

	// SyncTags enables pushing and pulling tags (default: true).
	SyncTags bool

	// CommitMessage denotes a git commit message (default: DefaultCommitMessage).
	CommitMessage string
	// contains filtered or unexported fields
}

Config prepares high level git sync operations.

func NewConfig

func NewConfig() Config

NewConfig constructs a Config.

func (Config) Commit added in v0.0.2

func (o Config) Commit() error

Commit commits any staged changes.

func (Config) EnsureNonce

func (o Config) EnsureNonce() error

EnsureNonce updates NoncePath with the current timestamp.

func (Config) FetchTags added in v0.0.7

func (o Config) FetchTags() error

FetchTags fetches any remote tags.

func (Config) Kick

func (o Config) Kick() error

Kick automates:

* Staging all file changes * Committing all changes * Pulling any remote changes * Pushing any local changes * Pulling and pushing tags

func (Config) Pull added in v0.0.2

func (o Config) Pull() error

Pull pulls any remote changes.

func (Config) Push added in v0.0.2

func (o Config) Push() error

Push pushes any local changes.

func (Config) PushTags added in v0.0.5

func (o Config) PushTags() error

PushTags pushes any local tags.

func (*Config) QueryRemotes added in v0.0.6

func (o *Config) QueryRemotes() error

QueryRemotes populates metadata for remotes.

func (Config) Stage added in v0.0.2

func (o Config) Stage() error

Stage stages any local file changes.

Directories

Path Synopsis
src
cmd/kick
Package main implements a git sync utility.
Package main implements a git sync utility.

Jump to

Keyboard shortcuts

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