%global debug_package %{nil} %bcond check 0 Name: manage-release Version: 0.0.6 Release: %autorelease Summary: CLI for managing targets based on sources. License: GPL-2.0-only URL: https://src00.lsme.ca/devops/manage-release Source0: %{name}-v%{version}.tar.gz BuildRequires: golang %description %{summary}. %prep %autosetup -n %{name} go mod vendor %build GOFLAGS='-buildmode=pie -mod=vendor -trimpath' \ go build -ldflags "-X manage/cmd.Version=%{version}" -o mr . %install install -D -m 0755 mr %{buildroot}%{_bindir}/mr %if %{with check} %check GOFLAGS='-mod=vendor -trimpath' \ go test ./... %endif %files %license LICENSE %doc README.md %{_bindir}/mr %changelog %autochangelog