File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
continuous_delivery_scripts Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -23,4 +23,4 @@ pre-commit = "*"
23
23
allow_prereleases = true
24
24
25
25
[packages ]
26
- continuous-delivery-scripts = {path = " ." }
26
+ continuous-delivery-scripts = {editable = true , path = " ." }
Original file line number Diff line number Diff line change 11
11
import subprocess
12
12
from auto_version import auto_version_tool
13
13
from continuous_delivery_scripts .utils .definitions import CommitType
14
+ from continuous_delivery_scripts .utils .git_helpers import LocalProjectRepository
14
15
from continuous_delivery_scripts .utils .configuration import configuration , ConfigurationVariable
15
16
from continuous_delivery_scripts .utils .logging import log_exception , set_log_level
16
17
from continuous_delivery_scripts .utils .filesystem_helpers import cd
@@ -85,12 +86,17 @@ def _update_version_string(
85
86
version_elements: version elements
86
87
"""
87
88
if commit_type == CommitType .DEVELOPMENT :
88
- return "%s-%s+%s" % (
89
+ commit_count = version_elements .get (auto_version_tool .Constants .COMMIT_COUNT_FIELD )
90
+ if not commit_count :
91
+ with LocalProjectRepository () as git :
92
+ commit_count = git .get_commit_count ()
93
+ return "%s-%s.%s+%s" % (
89
94
new_version ,
90
95
auto_version_tool .config .BUILD_TOKEN ,
96
+ commit_count ,
91
97
version_elements .get (auto_version_tool .Constants .COMMIT_FIELD ),
92
98
)
93
- return new_version
99
+ return new_version
94
100
95
101
96
102
def _get_version_elements (native_version_elements : Dict [str , str ]) -> Dict [str , str ]:
Original file line number Diff line number Diff line change
1
+ Fix development versions so that they can be used by any package managers i.e. pip and npm
You can’t perform that action at this time.
0 commit comments