• Stars
    star
    306
  • Rank 136,456 (Top 3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

gup - Update binaries installed by "go install" with goroutines.

All Contributors

Mentioned in Awesome Go MultiVersionUnitTest WindowsUnitTest MacUnitTest LinuxUnitTest reviewdog Coverage gosec Go Reference Go Report Card GitHub [日本語]

gup - Update binaries installed by "go install"

demo

gup command update binaries installed by "go install" to the latest version. gup updates all binaries in parallel, so very fast. It also provides subcommands for manipulating binaries under $GOPATH/bin ($GOBIN). It is a cross-platform software that runs on Windows, Mac and Linux.

If you are using oh-my-zsh, then gup has an alias set up. The alias is gup - git pull --rebase. Therefore, please make sure that the oh-my-zsh alias is disabled (e.g. $ \gup update).

sample

Supported OS (unit testing with GitHub Actions)

  • Linux
  • Mac
  • Windows

How to install

Use "go install"

If you does not have the golang development environment installed on your system, please install golang from the golang official website.

$ go install github.com/nao1215/gup@latest

For Mac user

$ brew tap nao1215/tap
$ brew install nao1215/tap/gup

Install from Package or Binary

The release page contains packages in .deb, .rpm, and .apk formats. gup command uses the go command internally, so the golang installation is required.

How to use

Update all binaries

If you update all binaries, you just run $ gup update.

$ gup update
gup:INFO : update binary under $GOPATH/bin or $GOBIN
gup:INFO : [ 1/30] github.com/cheat/cheat/cmd/cheat (Already up-to-date: v0.0.0-20211009161301-12ffa4cb5c87)
gup:INFO : [ 2/30] fyne.io/fyne/v2/cmd/fyne_demo (Already up-to-date: v2.1.3)
gup:INFO : [ 3/30] github.com/nao1215/gal/cmd/gal (v1.0.0 to v1.2.0)
gup:INFO : [ 4/30] github.com/matsuyoshi30/germanium/cmd/germanium (Already up-to-date: v1.2.2)
gup:INFO : [ 5/30] github.com/onsi/ginkgo/ginkgo (Already up-to-date: v1.16.5)
gup:INFO : [ 6/30] github.com/git-chglog/git-chglog/cmd/git-chglog (Already up-to-date: v0.15.1)
   :
   :

Update the specified binary

If you want to update only the specified binaries, you specify multiple command names separated by space.

$ gup update subaru gup ubume
gup:INFO : update binary under $GOPATH/bin or $GOBIN
gup:INFO : [1/3] github.com/nao1215/gup (v0.7.0 to v0.7.1)
gup:INFO : [2/3] github.com/nao1215/subaru (Already up-to-date: v1.0.2)
gup:INFO : [3/3] github.com/nao1215/ubume/cmd/ubume (Already up-to-date: v1.4.1)

Exclude binaries during gup update

If you don't want to update some binaries simply specify binaries which should not be updated separated using ',' without spaces as a delimiter. Also works in combination with --dry-run

$ gup update --exclude=gopls,golangci-lint    //--exclude or -e, this example will exclude 'gopls' and 'golangci-lint'

Update binaries with @main or @master

If you want to update binaries with @master or @main, you can specify the -m or --master option.

$ gup update --main=gup,lazygit,sqly

List up command name with package path and version under $GOPATH/bin

list subcommand print command information under $GOPATH/bin or $GOBIN. The output information is the command name, package path, and command version. sample

Remove the specified binary

If you want to remove a command under $GOPATH/bin or $GOBIN, use the remove subcommand. The remove subcommand asks if you want to remove it before removing it.

$ gup remove subaru gal ubume
gup:CHECK: remove /home/nao/.go/bin/subaru? [Y/n] Y
gup:INFO : removed /home/nao/.go/bin/subaru
gup:CHECK: remove /home/nao/.go/bin/gal? [Y/n] n
gup:INFO : cancel removal /home/nao/.go/bin/gal
gup:CHECK: remove /home/nao/.go/bin/ubume? [Y/n] Y
gup:INFO : removed /home/nao/.go/bin/ubume

If you want to force the removal, use the --force option.

$ gup remove --force gal
gup:INFO : removed /home/nao/.go/bin/gal

Check if the binary is the latest version

If you want to know if the binary is the latest version, use the check subcommand. check subcommand checks if the binary is the latest version and displays the name of the binary that needs to be updated.

$ gup check
gup:INFO : check binary under $GOPATH/bin or $GOBIN
gup:INFO : [ 1/33] github.com/cheat/cheat (Already up-to-date: v0.0.0-20211009161301-12ffa4cb5c87)
gup:INFO : [ 2/33] fyne.io/fyne/v2 (current: v2.1.3, latest: v2.1.4)
   :
gup:INFO : [33/33] github.com/nao1215/ubume (Already up-to-date: v1.5.0)

gup:INFO : If you want to update binaries, the following command.
           $ gup update fyne_demo gup mimixbox

Like other subcommands, you can only check the specified binaries.

$ gup check lazygit mimixbox
gup:INFO : check binary under $GOPATH/bin or $GOBIN
gup:INFO : [1/2] github.com/jesseduffield/lazygit (Already up-to-date: v0.32.2)
gup:INFO : [2/2] github.com/nao1215/mimixbox (current: v0.32.1, latest: v0.33.2)

gup:INFO : If you want to update binaries, the following command.
           $ gup update mimixbox

Export/Import subcommand

You use the export/import subcommand if you want to install the same golang binaries across multiple systems. By default, export-subcommand exports the file to $XDG_CONFIG_HOME/gup/gup.conf. If you want to know XDG Base Directory Specification, see this link. After you have placed gup.conf in the same path hierarchy on another system, you execute import-subcommand. gup start the installation according to the contents of gup.conf.

※ Environments A (e.g. ubuntu)
$ gup export
gup:INFO: Export /home/nao/.config/gup/gup.conf

※ Environments B (e.g. debian)
$ ls /home/nao/.config/gup/gup.conf
/home/nao/.config/gup/gup.conf
$ gup import

Alternatively, export subcommand print package information (it's same as gup.conf) that you want to export at STDOUT if you use --output option. import subcommand can also specify the gup.conf file path if you use --input option.

※ Environments A (e.g. ubuntu)
$ gup export --output > gup.conf

※ Environments B (e.g. debian)
$ gup import --input=gup.conf

Generate man-pages (for linux, mac)

man subcommand generates man-pages under /usr/share/man/man1.

$ sudo gup man
gup:INFO : Generate /usr/share/man/man1/gup-bug-report.1.gz
gup:INFO : Generate /usr/share/man/man1/gup-check.1.gz
gup:INFO : Generate /usr/share/man/man1/gup-completion.1.gz
gup:INFO : Generate /usr/share/man/man1/gup-export.1.gz
gup:INFO : Generate /usr/share/man/man1/gup-import.1.gz
gup:INFO : Generate /usr/share/man/man1/gup-list.1.gz
gup:INFO : Generate /usr/share/man/man1/gup-man.1.gz
gup:INFO : Generate /usr/share/man/man1/gup-remove.1.gz
gup:INFO : Generate /usr/share/man/man1/gup-update.1.gz
gup:INFO : Generate /usr/share/man/man1/gup-version.1.gz
gup:INFO : Generate /usr/share/man/man1/gup.1.gz

Generate shell completion file (for bash, zsh, fish)

completion subcommand generates shell completion files for bash, zsh, and fish. If the shell completion file does not exist in the system, the generation process will begin. To activate the completion feature, restart the shell.

$ gup completion
gup:INFO : create bash-completion file: /home/nao/.bash_completion
gup:INFO : create fish-completion file: /home/nao/.config/fish/completions/gup.fish
gup:INFO : create zsh-completion file: /home/nao/.zsh/completion/_gup

Desktop notification

If you use gup with --notify option, gup command notify you on your desktop whether the update was successful or unsuccessful after the update was finished.

$ gup update --notify

success warning

Contributing

First off, thanks for taking the time to contribute! ❤️ See CONTRIBUTING.md for more information. Contributions are not only related to development. For example, GitHub Star motivates me to develop!

Star History

Star History Chart

Contact

If you would like to send comments such as "find a bug" or "request for additional features" to the developer, please use one of the following contacts.

You can use the bug-report subcommand to send a bug report.

$ gup bug-report
※ Open GitHub issue page by your default browser

LICENSE

The gup project is licensed under the terms of the Apache License 2.0.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

CHIKAMATSU Naohiro
CHIKAMATSU Naohiro

💻
KEINOS
KEINOS

💻
mattn
mattn

💻
Justin Lecher
Justin Lecher

💻
Lincoln Nogueira
Lincoln Nogueira

💻
Masaya Watanabe
Masaya Watanabe

💻
memreflect
memreflect

💻
Akimo
Akimo

💻
rkscv
rkscv

💻
Ville Skyttä
Ville Skyttä

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

More Repositories

1

markdown

simple markdown & mermaid builder in golang with
Go
55
star
2

spectest

A simple and extensible behavioural testing library for Go. You can use api test to simplify REST API, HTTP handler and e2e tests.
Go
37
star
3

mimixbox

MimixBox - mimic BusyBox on Linux
Go
35
star
4

sqly

sqly - eaisly execute SQL against CSV/TSV/LTSV/JSON and Microsoft Excel™ with shell.
Go
35
star
5

mkgoprj

mkgoprj - Golang project template generator
Go
19
star
6

morrigan

morrigan - Penetration Tool Set
Go
13
star
7

hottest

hottest - user-friendly 'go test' that extracts error messages.
Go
9
star
8

jose

jose - CLI tool for JOSE (JSON Object Signing and Encryption)
Go
8
star
9

rainbow

🌈user-friendly AWS toolset and cloudformation templates
Go
8
star
10

leadtime

leadtime - caluculate GitHub PR lead time statistics
Go
6
star
11

deapk

deapk - parse android package (.apk), getting meta data and more.
Go
6
star
12

imaging

Imaging is a simple image processing package for Go
Go
6
star
13

go-lapras

go-lapras - Go library for accessing the LAPRAS inc. API.
Go
6
star
14

LearningXinuFromSource

XINU (Real Time OS)学習用リポジトリ。
C++
6
star
15

libvalacore

libcore is basic library for vala language.
Vala
6
star
16

spare

spare - Single Page Application Release Easily (deployment tool for AWS)
Go
5
star
17

csv

csv - read csv with validation in golang
Go
5
star
18

honeycomb

🐝 honeycomb - Nostr client CLI application for cross-platform
Go
5
star
19

ddl-maker

ddl-maker generate ddl (SQL file) from Go struct.
Go
4
star
20

gorky

gorky - powerful & bitter utility library in golang
Go
4
star
21

aiondb

[WIP] AION DB - In-memory SQL engine for testing purpose
Go
4
star
22

emigre

[WIP] emigre - Self-hosted image sharing social media
Go
4
star
23

pooh

[WIP] pooh - scraping cli tool for money
Go
3
star
24

golden

golden - golden file testing for Go
Go
3
star
25

cic

cic - compound interest calculator
Rust
3
star
26

my-life

経歴、性格、死ぬまでにしたいこと、日記
Shell
3
star
27

subaru

subaru - "fortune command" written by golang
Go
3
star
28

LinuxKernelArticle

Linux Kernelに関する記事で用いるソースコード。
C
3
star
29

naraku

naraku (奈落) - API collection for testing go-spectest/spectest
Go
3
star
30

speaker

speaker - Read the text aloud
Go
2
star
31

reddit-downloader

reddit-downloader - Reddit Image Downloader written in Golang
Go
2
star
32

ProgrammingLesson

ProgrammingLesson - プログラミング初心者用の問題集
Kotlin
2
star
33

posixer

posixer - Check if the POSIX command is installed on your system
Go
2
star
34

hs-coreutils

hs-coreutils: coreutils written in haskell
Haskell
2
star
35

diff

diff is a partial port of Python difflib module
Go
2
star
36

mermaid

simple mermaid sequence diagram builder in golang
Go
2
star
37

hasher

hasher - generate & compare hash using multiple algorithms.
Go
2
star
38

actions-ebitengine

Set up your GitHub Actions workflow with ebitengine dependencies
1
star
39

LGTM-image

LGTM-image: LGTM image I use in my company
1
star
40

coincheck

coincheck - coincheck public & private API client written in Go.
Go
1
star
41

database-schema-design-examples

Database Schema Design Examples
1
star
42

elm-lesson

elm言語の練習リポジトリ
HTML
1
star
43

holidays-jp-android-app

holidays-jp-android-app: 祝日チェックアプリ(Androidアプリ学習用)
Kotlin
1
star
44

nameconv

nameconv is library that converts string naming conventions.
Go
1
star
45

lgtm

lgtm - Copy LGTM images to the clipboard
Makefile
1
star
46

http-status-code

http-status-code return the meaning of HTTP status codes with RFC
Go
1
star
47

octocovs-central-repo

octocovs-central-repo for creating badges
1
star
48

selfish

selfish - the shell dyed in your selfish colors.
OCaml
1
star
49

nao1215

Profile
1
star
50

actions-hottest

GitHub Actions for hottest
Shell
1
star
51

gal

gal - generate authors file from git log
Go
1
star
52

osinfo

osinfo library get HW / SW information for Linux/Mac/Unix.
Go
1
star
53

goavl

goavl: Goa framework (version1) linter
Go
1
star
54

server-side-strength-in-jp-companies

日本国内企業:サーバーサイドに関する強み一覧
1
star
55

my-daily

個人的な日記(週報レベル)
1
star
56

KotlinLesson

Kotlinを書き散らすリポジトリ
Kotlin
1
star
57

golling

golling - update golang to the latest version
Go
1
star
58

food-ware-license

THE FOOD-WARE LICENSE
1
star
59

aws-cloudformation-lesson

aws-cloudformation-lesson - AWS CFn examples with localstack
JavaScript
1
star
60

denv

"denv" is a library that manages the deployment environment, which can be one of development, integration, staging, or production.
Go
1
star
61

Klipy

Klipy - CLI/GUI toolsets for manipulating the clipboard
Kotlin
1
star
62

homebrew-tap

homebrew-tap for projects developed by nao1215
Ruby
1
star
63

contributor

contributor - print and generate contributor List (only support git)
Go
1
star