File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515import os .path
16+
1617THIS_DIR = os .path .dirname (__file__ )
1718
1819try :
19- with open (os .path .join (THIS_DIR , ' version.txt' ), 'r' ) as f :
20+ with open (os .path .join (THIS_DIR , " version.txt" ), "r" ) as f :
2021 version = f .read ()
2122except :
22- version = ' 0.0.0.0'
23+ version = " 0.0.0"
2324
24- version_info = list (map (int , version .split ('.' )))
25+ version_info = list (map (int , version .split ("." )))
Original file line number Diff line number Diff line change 4545def newrelic_agent_guess_next_version (tag_version ):
4646 version , _ , _ = str (tag_version ).partition ("+" )
4747 version_info = list (map (int , version .split ("." )))
48- if len (version_info ) < 4 :
48+ if len (version_info ) < 3 :
4949 return version
5050 version_info [1 ] += 1
51- if version_info [1 ] % 2 :
52- version_info [3 ] = 0
53- else :
54- version_info [3 ] += 1
51+ version_info [2 ] = 0
5552 return "." .join (map (str , version_info ))
5653
5754
@@ -134,7 +131,7 @@ def build_extension(self, ext):
134131 use_scm_version = {
135132 "version_scheme" : newrelic_agent_next_version ,
136133 "local_scheme" : "no-local-version" ,
137- "git_describe_command" : "git describe --dirty --tags --long --match *.*.*.* " ,
134+ "git_describe_command" : "git describe --dirty --tags --long --match *.*.*" ,
138135 "write_to" : "newrelic/version.txt" ,
139136 },
140137 setup_requires = ["setuptools_scm>=3.2,<7" ],
You can’t perform that action at this time.
0 commit comments