Skip to content

Commit 4246d72

Browse files
committed
fix version
1 parent 6f4c37f commit 4246d72

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

SPECS/trident/trident.spec

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,11 @@ EOF
247247
%endif
248248

249249
%build
250+
%if %{undefined rpm_ver}
251+
export TRIDENT_VERSION="%{version}-%{release}"
252+
%else
250253
export TRIDENT_VERSION="%{trident_version}"
254+
%endif
251255
cargo build --release
252256

253257
mkdir selinux
@@ -259,14 +263,17 @@ make -f %{_datadir}/selinux/devel/Makefile %{name}.pp
259263
bzip2 -9 %{name}.pp
260264

261265
%check
262-
test "$(./target/release/trident --version)" = "trident %{trident_version}"
263266
%if %{undefined rpm_ver}
267+
test "$(./target/release/trident --version)" = "trident %{version}-%{release}"
268+
export TRIDENT_VERSION="%{version}-%{release}"
264269
# For distro builds, allow trident unit tests to execute as part of check
265270
%ifarch x86_64
266271
# Run unit tests only for x86_g4.
267272
# Skip 3 tests that do not work in RPM chroot environment
268273
cargo test --all --no-fail-fast -- --skip test_run_systemd_check --skip test_prepare_mount_directory --skip test_read
269274
%endif
275+
%else
276+
test "$(./target/release/trident --version)" = "trident %{trident_version}"
270277
%endif
271278

272279
%install

0 commit comments

Comments
 (0)