3
2

More than 3 years have passed since last update.

goで作ったツールインストールするの面倒くさい

Last updated at Posted at 2020-04-05

goでツール作ろう

「まくる」と言うほどには作ってないけど。
ところで、go製のツールいっぱいあるけど、管理だるくない?

install は楽ちん。

$ go get github.com/foo/bar

で、一月ほど経った頃に、 bar がアップデートしたらしいことを知る。
さて、なんだっけなと思いながら

$ go get github.com/bar/bar

あれ、通らねえやとなる。しょうがないので、調べてああそうだ、fooさんだったこれ、となる。
…ならまだしも、変なツールインストールしちゃったりしたら目も当てられない。

そしてさて、新しい環境作るかな、となるとこれをインストールしたツール分繰り返す。
だるい。

homebrewっぽくしたい

作った。
https://github.com/kyoh86/gordon

$ gordon install foo/bar
$ which bar
/home/kyoh86/.local/bin/bar
$ gordon update
$ gordon uninstall foo/bar
$ gordon dump GordonDumpFile
$ gordon restore GordonDumpFile

あら便利。

制限

  • GitHub Releasesにアップロードされたアセットしか見てない。
  • GitHub Enterpriseへの対応が適当(環境がない)のでバグがありそう。
    • $ gordon config set github.host hogehoge.com とか $ gordon config set github.user foo とかして使えるはず。
  • アセットにはGOOS相当(windowsとか)とGOARCH相当(386とか)を含んでないと駄目。
  • バイナリとmanファイルだけインストールする。

適当に作ったので、まだ全然ブラッシュアップできてない。
賛同者の方いらっしゃいましたらContributeお待ちしています。

もらえたら嬉しいツッコミその他

  • GitHub Releasesつかうのだるい
    • → goreleaserを使え。良いぞ。
  • Linuxbrew使えば?
    • → はい。
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2