print project_properties.get('sdk_profile')
data['profile'] = project_properties.get('sdk_profile')
# Set new branch and tag
+ branch_postfix = project_properties.get('app_type', 'tpk')
if data.get('branch').endswith('_' + data.get('profile')):
- data['new_branch'] = data.get('branch') + '_tpk'
+ data['new_branch'] = data.get('branch') + '_' + branch_postfix
else:
- data['new_branch'] = data.get('branch') + '_' + data.get('profile') + '_tpk'
+ data['new_branch'] = data.get('branch') + '_' + data.get('profile') + '_' + branch_postfix
#TODO: SPIN will use only _tpk postfix. Do not use profile name.
if data.get('gerrit_infra') == 'LOCAL':
- data['new_branch'] = data.get('branch') + '_tpk'
+ data['new_branch'] = data.get('branch') + '_' + branch_postfix
#TODO: If app source postfix, link to original branch
if data.get('branch').endswith(os.getenv('ABS_SOURCE_BRANCH_PREFIX')):
tagger = mygit.get_tag(tag)
# get project mappings from git-obs-mapping and git-ref-mapping
- if git_branch.endswith('_tpk'): # ABS - mappings w/o _tpk postfix(only for profiles).
- # Set default to the current branch
+ if git_branch.endswith('_tpk') or git_branch.endswith('_wgt'): # ABS - mappings w/o _tpk postfix(only for profiles).
+ abs_branch_postfix = git_branch[-4:]
work_branch = git_branch
if os.getenv('ABS_SUPPORTED_PROFILES', None):
for sp in os.getenv('ABS_SUPPORTED_PROFILES').split(','):
- work_branch = work_branch.replace('_%s_tpk' % sp.lower(), '')
- work_branch = work_branch.replace('_tpk', '')
+ work_branch = work_branch.replace('_%s%s' % (sp.lower(), abs_branch_postfix), '')
+ work_branch = work_branch.replace(abs_branch_postfix, '')
else:
- work_branch = work_branch.replace('_tpk', '')
+ work_branch = work_branch.replace(abs_branch_postfix, '')
print 'work_branch:%s' % work_branch
obs_target_prjs = git_obs_map(event['project'], work_branch)
if os.getenv("REF_USE_FOR_PRERELEASE","0") == "1":
obs_use_specname = item['OBS_use_specname']
if build_type == 'prerelease':
- if obs_stg_prj == 'abs' and git_branch.endswith('_tpk'):
- print 'Create ABS prerelease project...'
+ if obs_stg_prj == 'abs':
+ if git_branch.endswith('_tpk') or git_branch.endswith('_wgt'):
+ print 'Create ABS prerelease project...'
elif obs_stg_prj != 'prerelease':
print "%s is not 'prerelease' project in git-obs-mapping.xml." \
"It has been switched to submitobs workflow." \
saved_info['linked_build_projects'] = manifest_list
#TODO: tizen_{profile}_tpk branch hack
- if branch.endswith('_tpk'):
+ if branch.endswith('_tpk') or branch.endswith('_wgt'):
+ abs_branch_postfix = branch[-4:]
if os.getenv('ABS_SUPPORTED_PROFILES', None):
for sp in os.getenv('ABS_SUPPORTED_PROFILES').split(','):
- branch = branch.replace('_%s_tpk' % sp.lower(), '')
+ branch = branch.replace('_%s%s' % (sp.lower(), abs_branch_postfix), '')
#branch = branch.split('_%s_tpk' % target_project.split(':')[-1].lower())[0]
print 'We have [%s] [%s]' % (target_project, branch)