Modify main.go to set the version the spec file version-release data
This commit is contained in:
parent
c7dc63b8f0
commit
e400eca3de
10
gitea.spec
10
gitea.spec
@ -2,7 +2,7 @@ ExclusiveArch: %{go_arches}
|
|||||||
|
|
||||||
Name: gitea
|
Name: gitea
|
||||||
Version: 1.8.3
|
Version: 1.8.3
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Gitea: Git with a cup of tea
|
Summary: Gitea: Git with a cup of tea
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -63,12 +63,18 @@ export GOOS
|
|||||||
# rm -fr vendor
|
# rm -fr vendor
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Push our package version, release, and buidl tags into the code
|
||||||
|
#
|
||||||
|
sed -i -e 's/^var Version.*$/var Version = "%{version}-%{release}"/g' main.go
|
||||||
|
|
||||||
#
|
#
|
||||||
# Using -a to force everything to compile
|
# Using -a to force everything to compile
|
||||||
#
|
#
|
||||||
# Using -v to display what is happening
|
# Using -v to display what is happening
|
||||||
#
|
#
|
||||||
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"'
|
go build -a -v -tags 'bindata pam sqlite sqlite_unlock_notify'
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's|^User=.*$|User=gitea|g' \
|
-e 's|^User=.*$|User=gitea|g' \
|
||||||
-e 's|^Group=.*$|Group=gitea|g' \
|
-e 's|^Group=.*$|Group=gitea|g' \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user