summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2023-01-25 13:11:22 -0600
committerWilliam Hubbs <williamh@gentoo.org>2023-01-25 13:12:07 -0600
commit416efede37849cdf4105e47564fd9f45786fa885 (patch)
tree541e00182d323bcedd9b12756f2efbdabef85311
parentkde-apps/gwenview: drop 22.12.1 (diff)
downloadgentoo-416efede37849cdf4105e47564fd9f45786fa885.tar.gz
gentoo-416efede37849cdf4105e47564fd9f45786fa885.tar.bz2
gentoo-416efede37849cdf4105e47564fd9f45786fa885.zip
dev-go/golangci-lint: fix version output
Closes: https://bugs.gentoo.org/891949 Signed-off-by: William Hubbs <williamh@gentoo.org>
-rw-r--r--dev-go/golangci-lint/golangci-lint-1.50.1-r1.ebuild36
-rw-r--r--dev-go/golangci-lint/z23
2 files changed, 59 insertions, 0 deletions
diff --git a/dev-go/golangci-lint/golangci-lint-1.50.1-r1.ebuild b/dev-go/golangci-lint/golangci-lint-1.50.1-r1.ebuild
new file mode 100644
index 000000000000..abca8a1df0a5
--- /dev/null
+++ b/dev-go/golangci-lint/golangci-lint-1.50.1-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module
+# update on every bump
+GIT_COMMIT=8926a95f
+
+DESCRIPTION="Fast linters runner for Go"
+HOMEPAGE="https://github.com/golangci/golangci-lint"
+SRC_URI="https://github.com/golangci/golangci-lint/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="test"
+
+src_compile() {
+ CGO_ENABLED=0 ego build -trimpath -ldflags "
+ -X main.commit=${GIT_COMMIT}
+ -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)
+ -X main.version=${PV}" \
+ -o golangci-lint ./cmd/golangci-lint
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ dobin golangci-lint
+ einstalldocs
+dodoc CHANGELOG.md
+}
diff --git a/dev-go/golangci-lint/z b/dev-go/golangci-lint/z
new file mode 100644
index 000000000000..a4262e04e863
--- /dev/null
+++ b/dev-go/golangci-lint/z
@@ -0,0 +1,23 @@
+--- golangci-lint-1.50.1.ebuild 2023-01-25 13:09:02.452292865 -0600
++++ golangci-lint-1.50.1-r1.ebuild 2023-01-25 13:08:57.892292243 -0600
+@@ -3,6 +3,7 @@
+
+ EAPI=8
+ inherit go-module
++GIT_COMMIT=8926a95f
+
+ DESCRIPTION="Fast linters runner for Go"
+ HOMEPAGE="https://github.com/golangci/golangci-lint"
+@@ -16,7 +17,11 @@
+ RESTRICT="test"
+
+ src_compile() {
+- emake build
++ CGO_ENABLED=0 ego build -trimpath -ldflags "
++ -X main.commit=${GIT_COMMIT}
++ -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)
++ -X main.version=${PV}" \
++ -o golangci-lint ./cmd/golangci-lint
+ }
+
+ src_test() {