Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1import json 

2 

3class Build: 

4 """ This represent an application build """ 

5 def __init__(self, build_dir): 

6 """ 

7 Parameters 

8 ---------- 

9 build_dir: str 

10 The directory for the build. 

11 """ 

12 self.build_dir = build_dir 

13 with open(f"{self.build_dir}/manifest.json", "r") as f: 

14 self.manifest = json.load(f) 

15 

16 @property 

17 def artifacts(self): 

18 """List of artifacts of the build""" 

19 return ("app.zip", "lib.zip", "main.py", "manifest.json") 

20 

21 @property 

22 def version(self): 

23 """Build version""" 

24 return self.manifest["version"]