diff --git a/jenkins/getPlatform.py b/jenkins/getPlatform.py index 224ff6948764e995eb85415f4c71ca3c445070fc..3d84a27a26b56a546868512f4288156f33a4e206 100755 --- a/jenkins/getPlatform.py +++ b/jenkins/getPlatform.py @@ -13,15 +13,9 @@ import distro # replacement of platform.linux_distribution https://github.com/ni arch = platform.machine() system = platform.system() -flagarch = 0 -flagcxx=0 #---Determine external architecture and extra options---------------- -if os.getenv('ARCHITECTURE'): - architecture = os.getenv('ARCHITECTURE') - flagarch = 1 -if os.getenv('CXXOPTIONS'): - cxxoptions = os.getenv('cxxoptions') - flagcxx = 1 +architecture = os.getenv('ARCHITECTURE', None) +cxxoptions = os.getenv('cxxoptions', None) #---Determine the OS and version-------------------------------------- if system == 'Darwin' : if int(platform.mac_ver()[0].split('.')[0]) > 10 : @@ -107,11 +101,11 @@ if buildtype == 'Release' : bt = 'opt' elif buildtype == 'Debug' : bt = 'dbg' else : bt = 'unk' -if flagarch==1: +if architecture: print('%s+%s-%s-%s-%s' % (arch, architecture, osvers, compiler, bt)) -elif flagcxx==1: +elif cxxoptions: print('%s+%s-%s-%s-%s' % (arch, cxxoptions, osvers, compiler, bt)) -elif flagarch==1 and flagcxx==1: +elif architecture and cxxoptions: # we can never get here print('%s+%s+%s-%s-%s-%s' % (arch, architecture, cxxoptions, osvers, compiler, bt)) else: print('%s-%s-%s-%s' % (arch, osvers, compiler, bt))