-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.py
More file actions
31 lines (26 loc) · 818 Bytes
/
update.py
File metadata and controls
31 lines (26 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
""" Formula that always errors on build """
import os
from pakit import Git, Recipe
from pakit.exc import PakitCmdError
import tests.common as tc
class Update(Recipe):
"""
Formula that always errors on build
"""
def __init__(self):
super(Update, self).__init__()
self.src = os.path.join(tc.STAGING, 'git')
self.homepage = self.src
self.repos = {
'stable': Git(self.src, tag='0.31.0'),
'unstable': Git(self.src),
}
def build(self):
if self.repo_name == 'unstable':
raise PakitCmdError
else:
self.cmd('./build.sh --prefix {prefix}')
self.cmd('make install')
def verify(self):
lines = self.cmd('ag --version').output()
assert lines[0].find('ag version') != -1