terraformDummyRepo/devops_test.py

34 lines
No EOL
715 B
Python

import json
def init_project():
# validate_values()
version = Version('package.json')
version.parse()
def prepare_release():
pass
def release_in_git():
pass
class Version():
def __init__(self, config_file_path):
self.version = "0.0.0"
self.config_file_path = config_file_path
print('init project')
def parse(self):
if self.config_file_path.split('.').last() == 'json':
self.__parse_json()
def __parse_json(self):
with open(self.config_file_path, 'r') as json_file:
json_data = json.load(json_file)
print(json_data['version'])
def increment(self, level):
pass
def get():
pass