Accepting request 1124801 from home:ojkastl_buildservice:Branch_systemsmanagement_opentofu

- properly report the version (otherwise this would report
  1.6.0-dev)
- rename the executable to 'tofu', to match upstream naming

OBS-URL: https://build.opensuse.org/request/show/1124801
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:opentofu/opentofu?expand=0&rev=8
This commit is contained in:
Johannes Kastl 2023-11-10 08:11:57 +00:00 committed by Git OBS Bridge
parent 0cdcd7e465
commit c7bf941825
2 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Nov 10 08:06:42 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- properly report the version (otherwise this would report
1.6.0-dev)
- rename the executable to 'tofu', to match upstream naming
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Nov 10 07:19:13 UTC 2023 - kastl@b1-systems.de Fri Nov 10 07:19:13 UTC 2023 - kastl@b1-systems.de

View File

@ -16,6 +16,8 @@
# #
%define executable_name tofu
Name: opentofu Name: opentofu
Version: 1.6.0~alpha4 Version: 1.6.0~alpha4
Release: 0 Release: 0
@ -49,15 +51,16 @@ The key features of OpenTofu are:
go build \ go build \
-mod=vendor \ -mod=vendor \
-buildmode=pie \ -buildmode=pie \
-o bin/%{name} ./cmd/tofu -ldflags "-w -s -X github.com/opentofu/opentofu/version.dev=no -X github.com/opentofu/opentofu/version.Version=%{version}" \
-o bin/%{executable_name} ./cmd/tofu
%install %install
# Install the binary. # Install the binary.
install -D -m 0755 bin/%{name} "%{buildroot}/%{_bindir}/%{name}" install -D -m 0755 bin/%{executable_name} "%{buildroot}/%{_bindir}/%{executable_name}"
%files %files
%license LICENSE %license LICENSE
%doc CHANGELOG.md README.md %doc CHANGELOG.md README.md
%{_bindir}/%{name} %{_bindir}/%{executable_name}
%changelog %changelog