From 46f60501c4a22d487f220808120ecc9c5f836715 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 28 Jul 2019 23:45:45 -0500 Subject: [PATCH] Add ldflags to set the version number to match the RPM Version/Release data --- gitea.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gitea.spec b/gitea.spec index 4fc8cec..140bbdd 100644 --- a/gitea.spec +++ b/gitea.spec @@ -2,7 +2,7 @@ ExclusiveArch: %{go_arches} Name: gitea Version: 1.8.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Gitea: Git with a cup of tea License: MIT @@ -68,8 +68,7 @@ export GOOS # # Using -v to display what is happening # -# go build -a -v -tags 'bindata pam sqlite sqlite_unlock_notify' -TAGS='bindata pam sqlite sqlite_unlock_notify' make generate build +go build -a -v -tags 'bindata pam sqlite sqlite_unlock_notify' -ldflags '-X "main.Version=%{version}-%{release}" -X "main.Tags="bindata pam sqlite sqlite_unlock_notify"' sed -i \ -e 's|^User=.*$|User=gitea|g' \ -e 's|^Group=.*$|Group=gitea|g' \