Add skeleton for testing Version
This commit is contained in:
parent
0bd416a63f
commit
68397ed0e4
4 changed files with 86 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -21,3 +21,4 @@
|
|||
# Go workspace file
|
||||
go.work
|
||||
|
||||
__pycache__
|
25
build.py
25
build.py
|
@ -1,21 +1,32 @@
|
|||
from pybuilder.core import task, init
|
||||
from ddadevops import *
|
||||
from devops_test import *
|
||||
|
||||
|
||||
def main():
|
||||
init_project()
|
||||
|
||||
@init
|
||||
def initialize(project):
|
||||
pass
|
||||
project.build_depends_on('ddadevops>=3.1.2')
|
||||
# build = get_devops_build()
|
||||
# build.init()
|
||||
init_project()
|
||||
|
||||
@task
|
||||
def release(project):
|
||||
build = get_devops_build(project)
|
||||
build.init()
|
||||
build.prepareRelease() # mit config file
|
||||
# build
|
||||
build.publish
|
||||
build.releaseInGit
|
||||
# build = get_devops_build(project)
|
||||
# build.prepare_release() # mit config file
|
||||
prepare_release()
|
||||
# build()
|
||||
# build.publish()
|
||||
# build.release_in_git()
|
||||
# release_in_git()
|
||||
|
||||
|
||||
@task
|
||||
def build(project):
|
||||
build = get_devops_build(project)
|
||||
# ToDo: Implement for project
|
||||
|
||||
main()
|
34
devops_test.py
Normal file
34
devops_test.py
Normal file
|
@ -0,0 +1,34 @@
|
|||
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
|
33
package.json
Normal file
33
package.json
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"name": "dummy",
|
||||
"description": "Generate c4k yaml for a jitsi deployment.",
|
||||
"author": "meissa GmbH",
|
||||
"version": "1.3.2",
|
||||
"homepage": "https://gitlab.com/domaindrivenarchitecture/c4k-jitsi#readme",
|
||||
"repository": "https://www.npmjs.com/package/c4k-jitsi",
|
||||
"license": "APACHE2",
|
||||
"main": "c4k-jitsi.js",
|
||||
"bin": {
|
||||
"c4k-jitsi": "./c4k-jitsi.js"
|
||||
},
|
||||
"keywords": [
|
||||
"cljs",
|
||||
"jitsi",
|
||||
"k8s",
|
||||
"c4k",
|
||||
"deployment",
|
||||
"yaml",
|
||||
"convention4kubernetes"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://gitlab.com/domaindrivenarchitecture/c4k-jitsi/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"js-base64": "^3.6.1",
|
||||
"js-yaml": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"shadow-cljs": "^2.11.18",
|
||||
"source-map-support": "^0.5.19"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue