Browse Source

Separate specfile generation from copr triggering

Alois Mahdal 6 years ago
parent
commit
99bd0ba557
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      trigger_copr

+ 4
- 4
trigger_copr View File

41
       | sed "s/^v//"
41
       | sed "s/^v//"
42
 }
42
 }
43
 
43
 
44
-trigger() {
44
+mkspec() {
45
     local self_version
45
     local self_version
46
     self_version="slop-build-copr $(git describe --tags)"
46
     self_version="slop-build-copr $(git describe --tags)"
47
     sed -e "
47
     sed -e "
49
         /^Release/ s|__SLOP_RELEASE__|$Release|
49
         /^Release/ s|__SLOP_RELEASE__|$Release|
50
         /^Source0/ s|__SLOP_URLBASE__|$UrlBase|
50
         /^Source0/ s|__SLOP_URLBASE__|$UrlBase|
51
         /^# spec file/ s|__SLOP_BUILDSCRIPT_VERSION__|$self_version|
51
         /^# spec file/ s|__SLOP_BUILDSCRIPT_VERSION__|$self_version|
52
-    " <slop.spec.in >"$Tmp/slop.spec"
53
-    copr build --nowait "$CoprProject" "$Tmp/slop.spec"
52
+    " <slop.spec.in
54
 }
53
 }
55
 
54
 
56
 git_guess() {
55
 git_guess() {
111
         test -n "$Version" || Version=$(last_version)
110
         test -n "$Version" || Version=$(last_version)
112
         test -n "$Release" || Release=1
111
         test -n "$Release" || Release=1
113
     fi
112
     fi
113
+    mkspec >"$Tmp/slop.spec"
114
     $DryRun && {
114
     $DryRun && {
115
         warn "dry mode active, we would build:"
115
         warn "dry mode active, we would build:"
116
         warn "    at $CoprProject"
116
         warn "    at $CoprProject"
120
         warn "    yielding slop-$Version-$Release.*.rpm"
120
         warn "    yielding slop-$Version-$Release.*.rpm"
121
         exit 1
121
         exit 1
122
     }
122
     }
123
-    trigger
123
+    copr build --nowait "$CoprProject" "$Tmp/slop.spec"
124
     rm -rf "$Tmp"
124
     rm -rf "$Tmp"
125
 }
125
 }
126
 
126