@@ -10,26 +10,29 @@ basepath = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(SPEC)
1010
1111version = "1.2-rc2"
1212distribution_name = ''
13- if len (sys .argv ) > 2 :
14- version = str (sys .argv [2 ])
13+ if len (sys .argv ) > 1 :
14+ version = str (sys .argv [1 ])
1515 print ("RCM version: " + version )
16- if len (sys .argv ) > 3 :
17- distribution_name = str (sys .argv [3 ]).split ('/' )[0 ]
16+ if len (sys .argv ) > 2 :
17+ distribution_name = str (sys .argv [2 ]).split ('/' )[0 ]
1818 print ("RCM distribution: " + distribution_name )
19+
1920if distribution_name :
20- distribution_name = '_' + distribution_name
21- # this, should extract the part of the version name that comes after '_' or ''
22- # has to be applied to the output of git describe --tags --long
23- # like "v0.0.8-132-gdb62f50" --> ''
24- # "v0.0.8_dev-132-gdb62f50" --> 'dev'
25- platform_version = (version .strip ().rsplit ("-" )[0 ].split ("_" )[1 :][- 1 :]+ ["" ])[0 ]
26- if platform_version :
27- platform_version = '_' + platform_version
28- platform = str (sys .platform ) + '_' + str (platform .architecture ()[0 ]) + distribution_name + platform_version
21+ platform_version = ''
22+ platform = distribution_name
23+ else :
24+ # this, should extract the part of the version name that comes after '_' or ''
25+ # has to be applied to the output of git describe --tags --long
26+ # like "v0.0.8-132-gdb62f50" --> ''
27+ # "v0.0.8_dev-132-gdb62f50" --> 'dev'
28+ platform_version = (version .strip ().rsplit ("-" )[0 ].split ("_" )[1 :][- 1 :]+ ["" ])[0 ]
29+ if platform_version :
30+ platform_version = '_' + platform_version
31+ platform = str (sys .platform ) + '_' + str (platform .architecture ()[0 ]) + distribution_name + platform_version
32+
2933exe_name = 'RCM' + platform_version
3034exe_path = os .path .join ('dist' , exe_name )
3135
32-
3336build_platform_filename = os .path .join (basepath , 'build_platform.txt' )
3437with open (build_platform_filename , "w" ) as f :
3538 f .write (platform + '\n ' )
0 commit comments