0.3 #146

Merged
edraft merged 359 commits from 0.3 into master 2023-01-12 07:04:40 +01:00
2 changed files with 11 additions and 6 deletions
Showing only changes of commit 47dd6fdc2d - Show all commits

View File

@ -19,7 +19,7 @@
"set-version": "tools/set_version/set-version.json"
},
"Scripts": {
"sv": "cpl set-version",
"sv": "cpl set-version $ARGS",
"set-version": "cpl run set-version $ARGS; echo '';",
"gv": "cpl get-version",
@ -37,9 +37,10 @@
"pre-dev": "cpl build",
"dev": "export KDB_ENVIRONMENT=development; export KDB_NAME=KDB-Dev; cpl start;",
"docker-build": "cpl b; docker-compose down; docker build -t kdb-bot/kdb-bot:$(cpl gv) .",
"docker-compose": "docker-compose up -d",
"docker": "cpl docker-build; cpl docker-compose;"
"docker-build": "cpl build $ARGS; cd docker; echo docker build -t kdb-bot/kdb-bot:$(cd ../; cpl gv; cd docker;) .; cd ..;",
"dc-up": "docker-compose up -d",
"dc-down": "docker-compose down",
"docker": "cpl dc-down; cpl docker-build; cpl dc-up;"
}
}
}

View File

@ -46,7 +46,7 @@ class Application(ApplicationABC):
return
if len(args) == 1:
suffix = f'.{args[0]}'
suffix = args[0]
try:
branch = self._git_service.get_active_branch_name()
@ -67,8 +67,12 @@ class Application(ApplicationABC):
version[VersionSettingsNameEnum.major.value] = branch.split('.')[0]
version[VersionSettingsNameEnum.minor.value] = branch.split('.')[1]
if len(branch.split('.')) == 2:
version[VersionSettingsNameEnum.micro.value] = f'0{suffix}'
if suffix == '':
suffix = '0'
version[VersionSettingsNameEnum.micro.value] = f'{suffix}'
else:
if not suffix.startswith('.') and suffix != '':
suffix = f'.{suffix}'
version[VersionSettingsNameEnum.micro.value] = f'{branch.split(".")[2]}{suffix}'
except Exception as e:
Console.error(f'Branch {branch} does not contain valid version')