File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,24 +39,6 @@ def run_cmd(cmd):
3939
4040gitdir = os .path .join (srcdir , ".git" )
4141
42- # Get the Sire version. (Latest tag.)
43- sire_version = run_cmd (f"git --git-dir={ gitdir } --work-tree={ srcdir } describe --tags --abbrev=0" )
44- print (sire_version )
45-
46- # Return a list of commits messages since the most recent tag.
47- sire_build = run_cmd (f"git --git-dir={ gitdir } --work-tree={ srcdir } log --oneline { sire_version } .." ).split ("\n " )
48- # Get the build number. (Number of commits since last tag.)
49- # If there are no commits, then we'll get a single item list containing an
50- # empty string. The logic below makes sure the build number is zero indexed.
51- if len (sire_build ) == 1 :
52- if sire_build [0 ]:
53- sire_build = 1
54- else :
55- sire_build = 0
56- else :
57- sire_build = len (sire_build )
58- print (sire_build )
59-
6042# Get the Sire branch.
6143sire_branch = run_cmd (f"git --git-dir={ gitdir } --work-tree={ srcdir } rev-parse --abbrev-ref HEAD" )
6244print (sire_branch )
@@ -87,8 +69,6 @@ def dep_lines(deps):
8769 elif line .find ("SIRE_BSS_REQUIREMENTS" ) != - 1 :
8870 line = bss_reqs
8971 else :
90- line = line .replace ("SIRE_VERSION" , sire_version )
91- line = line .replace ("SIRE_BUILD" , str (sire_build ))
9272 line = line .replace ("SIRE_BRANCH" , sire_branch )
9373
9474 FILE .write (line )
Original file line number Diff line number Diff line change 22
33package :
44 name : {{ name }}
5- version : SIRE_VERSION
5+ version : {{ GIT_DESCRIBE_TAG }}
66
77source :
88 git_url : https://github.com/michellab/Sire.git
99 git_tag : SIRE_BRANCH
1010
1111build :
12- number : SIRE_BUILD
12+ number : {{ GIT_DESCRIBE_NUMBER }}
1313
1414requirements :
1515 build :
You can’t perform that action at this time.
0 commit comments