2023-11-10 21:36:58 +00:00

42 lines
1.3 KiB
Plaintext

# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=terraform-ls
pkgver=0.32.3
pkgrel=0
pkgdesc="Terraform language server"
url="https://github.com/hashicorp/terraform-ls"
# upstream doesn't support the others
arch="x86_64 x86 aarch64 armv7"
license="MPL-2.0"
makedepends="go"
subpackages="$pkgname-doc"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/hashicorp/terraform-ls/archive/refs/tags/v$pkgver.tar.gz"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
echo "$pkgver" >version/VERSION
# TODO: find a way to run `go generate ./internal/schemas` successfully
# (without being rate-limited by Terraform's registry API, bloating the binary size or failing tests)
# Ref: https://github.com/hashicorp/terraform-ls/issues/1085
go build -v
}
check() {
# walker/testdata/ contains lock files with hashes only for linux_amd64 provider binaries.
# shellcheck disable=2046
go test $(go list ./... | grep -v /internal/walker)
}
package() {
install -Dm755 $pkgname -t "$pkgdir"/usr/bin/
install -Dm644 docs/*.md -t "$pkgdir"/usr/share/doc/$pkgname/
}
sha512sums="
f388017ad8dbfc39e82cb8f1f4046d812e023210cc503fb44ef4b78d8a1ee5593d4e8b0313cd73a54facbaa43d7fb46d12ba69b32206cab56508face0044daae terraform-ls-0.32.3.tar.gz
"