Include go tool versions in version check
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
2da45b5d37
commit
95c496cddc
1 changed files with 30 additions and 6 deletions
|
@ -1,13 +1,37 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
curl -sSf https://archlinux.org/packages/extra/x86_64/go/json/ |
|
pkgs=($(
|
||||||
jq -r '"# " + .pkgname + " v" + .pkgver + "-" + .pkgrel' >tools.txt.new
|
curl -sSfL "https://raw.githubusercontent.com/fatih/vim-go/master/plugin/go.vim" |
|
||||||
|
grep -Eo "\\ \['[^']*/[^']*'" |
|
||||||
|
tr -d "[' " |
|
||||||
|
sort
|
||||||
|
))
|
||||||
|
|
||||||
curl -sSfL "https://raw.githubusercontent.com/fatih/vim-go/master/plugin/go.vim" |
|
versions=()
|
||||||
grep -Eo "\\ \['[^']*/[^']*'" |
|
|
||||||
tr -d "[' " |
|
echo "### Packages from vim-go" >tools.txt.new
|
||||||
sort >>tools.txt.new
|
|
||||||
|
for pkg in "${pkgs[@]}"; do
|
||||||
|
qpkg=${pkg%@*}
|
||||||
|
ver=""
|
||||||
|
while [[ -z $ver ]]; do
|
||||||
|
ver=$(curl -sSf "https://proxy.golang.org/${qpkg}/@latest" | jq -r .Version || echo -n "")
|
||||||
|
[[ -n $ver ]] || qpkg=${qpkg%/*}
|
||||||
|
done
|
||||||
|
|
||||||
|
versions+=("# GoProxy: ${qpkg} ${ver}")
|
||||||
|
echo "${pkg}" >>tools.txt.new
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -e "\n### Version checking for package rebuilds" >>tools.txt.new
|
||||||
|
|
||||||
|
curl -sSf https://archlinux.org/packages/extra/x86_64/go/json/ |
|
||||||
|
jq -r '"# Archlinux: " + .pkgname + " v" + .pkgver + "-" + .pkgrel' >>tools.txt.new
|
||||||
|
|
||||||
|
for ver in "${versions[@]}"; do
|
||||||
|
echo "${ver}" >>tools.txt.new
|
||||||
|
done
|
||||||
|
|
||||||
diff tools.txt tools.txt.new && {
|
diff tools.txt tools.txt.new && {
|
||||||
echo "Up to date"
|
echo "Up to date"
|
||||||
|
|
Loading…
Reference in a new issue