pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/gh gh: Make "gh --version" output the actual version.
details: https://anonhg.NetBSD.org/pkgsrc/rev/65597659357d
branches: trunk
changeset: 379187:65597659357d
user: kim <kim%pkgsrc.org@localhost>
date: Thu May 12 15:45:54 2022 +0000
description:
gh: Make "gh --version" output the actual version.
diffstat:
net/gh/Makefile | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r 0a52ccf802d2 -r 65597659357d net/gh/Makefile
--- a/net/gh/Makefile Thu May 12 15:41:05 2022 +0000
+++ b/net/gh/Makefile Thu May 12 15:45:54 2022 +0000
@@ -1,6 +1,9 @@
-# $NetBSD: Makefile,v 1.39 2022/05/12 11:15:14 kim Exp $
+# $NetBSD: Makefile,v 1.40 2022/05/12 15:45:54 kim Exp $
+
+# Please also update GH_REL_DATE when upgrading to a new release.
DISTNAME= gh-2.10.1
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GITHUB:=cli/}
GITHUB_PROJECT= cli
@@ -15,6 +18,19 @@
GO_BUILD_PATTERN= ./cmd/gh
+GH_REL_DATE= 2022-05-10
+
+# Because we are not calling scripts/build as the Makefile for gh would
+# do, we do not get these flags set. These flags make the output from
+# "gh --version" meaningful.
+
+GH_LDFLAGS= -X github.com/cli/cli/v2/internal/build.Date=${GH_REL_DATE}
+GH_LDFLAGS+= -X github.com/cli/cli/v2/internal/build.Version=${PKGVERSION_NOREV}
+
+do-build:
+ ${RUN} cd ${WRKSRC} && ${_ULIMIT_CMD} ${PKGSRC_SETENV} ${MAKE_ENV} \
+ ${GO} install -v -ldflags "${GH_LDFLAGS}" ${GO_BUILD_PATTERN}
+
.include "go-modules.mk"
.include "../../lang/go/go-module.mk"
Home |
Main Index |
Thread Index |
Old Index