buildtasks 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5879afcde9bdcb15af3a1e7f184f6a6f970da13d
4
- data.tar.gz: 8334ffcd146bb1dd3034fb8733e8cf0772b2654d
3
+ metadata.gz: 23eaf60ec0b87d7301075cdd8d8fd1ae83c495a5
4
+ data.tar.gz: 6b9bebfc6efec80deb7f4b99709c27e926ab75a8
5
5
  SHA512:
6
- metadata.gz: 3c9bd07cc8289ecbc106f4c766cf40732da829e7fcf1c3bda42f228f1e3f495c2690eb6b1aad69895ce85c1bfa31076b42789ffc9455a2c5dd85c87b59928969
7
- data.tar.gz: 88eb7463a3f55bf40bab5d3c7c7f615b3622f4dfa40f3711751331661d098a039169ffb015f30b6954d54225d7cd0d20605d0b678167df7ebc14e9efd65365e9
6
+ metadata.gz: 02b5373852bd82509252793a3449443f9bc14701036c3ca61a426b90ed067ce85011fbfcb7804783da109b87d1f1ed7124862b82938335ce26dbca5abd9f4849
7
+ data.tar.gz: 4599087186e724688620ef8ba72ef4e1baf2d0d624ebaca23db1da76347c1e4d95a2ec68a9f430259e5238480a5e21fbd5c17b45d8e1f46eeaf1dd136e33c486
@@ -86,9 +86,10 @@ module BuildTasks
86
86
  desc "Build packages"
87
87
  task :build => [:clone, :patch, :deps] do
88
88
  in_git_dir do
89
- sh "git-buildpackage", "--git-ignore-branch",
90
- "--git-ignore-new",
91
- "--git-builder=#{BUILD_CMD}"
89
+ cmd = gbp_cmd + ["--git-ignore-branch",
90
+ "--git-ignore-new",
91
+ "--git-builder=#{BUILD_CMD}"]
92
+ sh(*cmd)
92
93
  end
93
94
  end
94
95
 
@@ -115,6 +116,14 @@ module BuildTasks
115
116
  def in_git_dir
116
117
  cd(git_dir) { yield }
117
118
  end
119
+
120
+ def gbp_cmd
121
+ path = `which git-buildpackage`
122
+ return [path.strip] if $CHILD_STATUS.success?
123
+ path = `which gbp`
124
+ return [path.strip, "buildpackage"] if $?.success?
125
+ raise "git-buildpackage command not found"
126
+ end
118
127
  end
119
128
  end
120
129
  end
@@ -1,3 +1,3 @@
1
1
  module BuildTasks
2
- VERSION = "0.0.3".freeze
2
+ VERSION = "0.0.4".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildtasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Lafeldt