Commit f26d41d7 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: isSRRelease now works if no software had been runned before

parent 4e2f9bc1
......@@ -814,7 +814,11 @@ def isSoftwareReleaseReady(config):
project = os.path.join(config['etc_dir'], '.project')
if not os.path.exists(project):
return "0";
software_name = open(project, 'r').readline().split('/')[-2]
path = open(project, 'r').readline().strip()
software_name = path
if software_name[-1] == '/':
software_name = software_name[:-1]
software_name = software_name.split('/')[-1]
if os.path.exists(os.path.join(config['runner_workdir'],
'softwareLink', software_name, '.completed')):
return "1"
......@@ -822,6 +826,7 @@ def isSoftwareReleaseReady(config):
if isSoftwareRunning(config):
return "2"
elif config['auto_deploy'] in (1, '1', True, 'true'):
configNewSR(config, path)
runSoftwareWithLock(config)
return "2"
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment