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,3 +48,5 @@ cmake -DCMAKE_INSTALL_PREFIX="/usr" ./
48 48
 /usr/include/slop.hpp
49 49
 %{_libdir}/libslopy.so
50 50
 %{_mandir}/man1/slop.1.gz
51
+
52
+# spec file generated from __SLOP_BUILDSCRIPT_VERSION__

+ 3
- 0
trigger_copr View File

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