Add auto-generator for tools list
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
94fd319c32
commit
d3a395b255
5 changed files with 41 additions and 25 deletions
15
.SRCINFO
Normal file
15
.SRCINFO
Normal file
|
@ -0,0 +1,15 @@
|
|||
pkgbase = vim-go-tools
|
||||
pkgdesc = Package of tools required by vim-go
|
||||
pkgver = 0.1.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/fatih/vim-go
|
||||
arch = x86_64
|
||||
license = other
|
||||
makedepends = go
|
||||
source = build.sh
|
||||
source = tools.txt
|
||||
sha512sums = 225301ca5a3435d70a12628f55a6174487a59970596a23010c52b4e6554573a0bb9e16d01e4e08211cd1301272142acf195e1a7b97b0ee007ae8cbe757387d70
|
||||
sha512sums = 751a9bf8bbea2fac37f4a9e405e2a5020ad0880b353ea9467d54f0a1a31dd321e8f860fc32646c463e2142f46c4b82826e426a872a71752cb63b32ad34393e1e
|
||||
|
||||
pkgname = vim-go-tools
|
||||
|
5
PKGBUILD
5
PKGBUILD
|
@ -8,8 +8,9 @@ arch=('x86_64')
|
|||
url="https://github.com/fatih/vim-go"
|
||||
license=(other)
|
||||
makedepends=('go')
|
||||
source=("build.sh")
|
||||
sha512sums=('5055aec7ebd34916110b85bde9f7db1bce22a278e0c02e518581d399919aac2052e9e9d9469ce869e9152e418234f494729170e0fa261c308c4f29d8abd01ac1')
|
||||
source=("build.sh" "tools.txt")
|
||||
sha512sums=('225301ca5a3435d70a12628f55a6174487a59970596a23010c52b4e6554573a0bb9e16d01e4e08211cd1301272142acf195e1a7b97b0ee007ae8cbe757387d70'
|
||||
'751a9bf8bbea2fac37f4a9e405e2a5020ad0880b353ea9467d54f0a1a31dd321e8f860fc32646c463e2142f46c4b82826e426a872a71752cb63b32ad34393e1e')
|
||||
|
||||
build() {
|
||||
mkdir -p "${srcdir}/go"
|
||||
|
|
24
build.sh
24
build.sh
|
@ -1,29 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
packages=(
|
||||
github.com/alecthomas/gometalinter
|
||||
github.com/davidrjenni/reftools/cmd/fillstruct
|
||||
github.com/fatih/gomodifytags
|
||||
github.com/fatih/motion
|
||||
github.com/go-delve/delve/cmd/dlv
|
||||
github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||
github.com/josharian/impl
|
||||
github.com/jstemmer/gotags
|
||||
github.com/kisielk/errcheck
|
||||
github.com/klauspost/asmfmt/cmd/asmfmt
|
||||
github.com/koron/iferr
|
||||
github.com/mdempsky/gocode
|
||||
github.com/rogpeppe/godef
|
||||
github.com/stamblerre/gocode
|
||||
github.com/zmb3/gogetdoc
|
||||
golang.org/x/lint/golint
|
||||
golang.org/x/tools/cmd/goimports
|
||||
golang.org/x/tools/cmd/gopls
|
||||
golang.org/x/tools/cmd/gorename
|
||||
golang.org/x/tools/cmd/guru
|
||||
honnef.co/go/tools/cmd/keyify
|
||||
)
|
||||
packages=($(cat tools.txt))
|
||||
|
||||
for package in "${packages[@]}"; do
|
||||
echo -e "\e[96mBuilding ${package}...\e[m" >&2
|
||||
|
|
0
tools.txt
Normal file
0
tools.txt
Normal file
22
update.sh
Normal file
22
update.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
curl -sSfL "https://raw.githubusercontent.com/fatih/vim-go/master/plugin/go.vim" |
|
||||
grep -Eo "\\ \['[^']*/[^']*'" |
|
||||
tr -d "[' " |
|
||||
sort >tools.txt.new
|
||||
|
||||
diff tools.txt tools.txt.new && {
|
||||
echo "Up to date"
|
||||
rm tools.txt.new
|
||||
exit 0
|
||||
} || true
|
||||
|
||||
mv tools.txt.new tools.txt
|
||||
updpkgsums
|
||||
|
||||
sed -i "s/pkgver=.*/pkgver=$(date +%Y.%m.%d)/" PKGBUILD
|
||||
makepkg --printsrcinfo >.SRCINFO
|
||||
|
||||
git add tools.txt .SRCINFO PKGBUILD
|
||||
git c -m "Update tools $(date +%Y.%m.%d)"
|
Loading…
Reference in a new issue