-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathfabfile.py
More file actions
32 lines (21 loc) · 770 Bytes
/
fabfile.py
File metadata and controls
32 lines (21 loc) · 770 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
32
from __future__ import unicode_literals
import time
import os.path
import yaml
import ship_it
__here__ = os.path.abspath(os.path.dirname(__file__))
MANIFEST_YAML = os.path.join(__here__, 'manifest.yaml')
MANIFEST_TEMPLATE = MANIFEST_YAML + '.template'
def _populate_manifest_and_invoke_fpm(iteration):
import sideboard
with open(MANIFEST_TEMPLATE) as f:
manifest = yaml.load(f)
manifest[b'version'] = sideboard.__version__
manifest[b'iteration'] = iteration
with open(MANIFEST_YAML, 'w') as f:
yaml.dump(manifest, f)
ship_it.fpm(MANIFEST_YAML)
def fpm_stable(iteration):
_populate_manifest_and_invoke_fpm(iteration)
def fpm_testing():
_populate_manifest_and_invoke_fpm(b'0.{}'.format(int(time.time())))