Browse Source

Add build script version to spec file

Alois Mahdal 6 years ago
parent
commit
03123bc868
2 changed files with 5 additions and 0 deletions
  1. 2
    0
      slop.spec.in
  2. 3
    0
      trigger_copr

+ 2
- 0
slop.spec.in View File

48
 /usr/include/slop.hpp
48
 /usr/include/slop.hpp
49
 %{_libdir}/libslopy.so
49
 %{_libdir}/libslopy.so
50
 %{_mandir}/man1/slop.1.gz
50
 %{_mandir}/man1/slop.1.gz
51
+
52
+# spec file generated from __SLOP_BUILDSCRIPT_VERSION__

+ 3
- 0
trigger_copr View File

42
 }
42
 }
43
 
43
 
44
 trigger() {
44
 trigger() {
45
+    local self_version
46
+    self_version="slop-build-copr $(git describe --tags)"
45
     sed -e "
47
     sed -e "
46
         /^Version/ s|__SLOP_VERSION__|$Version|
48
         /^Version/ s|__SLOP_VERSION__|$Version|
47
         /^Release/ s|__SLOP_RELEASE__|$Release|
49
         /^Release/ s|__SLOP_RELEASE__|$Release|
48
         /^Source0/ s|__SLOP_URLBASE__|$UrlBase|
50
         /^Source0/ s|__SLOP_URLBASE__|$UrlBase|
51
+        /^# spec file/ s|__SLOP_BUILDSCRIPT_VERSION__|$self_version|
49
     " <slop.spec.in >"$Tmp/slop.spec"
52
     " <slop.spec.in >"$Tmp/slop.spec"
50
     copr build --nowait "$CoprProject" "$Tmp/slop.spec"
53
     copr build --nowait "$CoprProject" "$Tmp/slop.spec"
51
 }
54
 }