@@ -24,17 +24,18 @@ def git_url_ssh_to_https(url):
24
24
"""Convert a git url
25
25
26
26
url will look like
27
- https://github.com/ARMmbed/autoversion .git
27
+ https://github.com/ARMmbed/snippet .git
28
28
or
29
- git@github.com:ARMmbed/autoversion .git
29
+ git@github.com:ARMmbed/snippet .git
30
30
we want:
31
- https://${GITHUB_TOKEN}@github.com/ARMmbed/autoversion .git
31
+ https://${GITHUB_TOKEN}@github.com/ARMmbed/snippet .git
32
32
"""
33
33
path = url .split ('github.com' , 1 )[1 ][1 :].strip ()
34
34
new = 'https://{GITHUB_TOKEN}@github.com/%s' % path
35
35
print ('rewriting git url to: %s' % new )
36
36
return new .format (GITHUB_TOKEN = os .getenv ('GITHUB_TOKEN' ))
37
37
38
+ VERSION_FILE = 'src/snippet/_version.py'
38
39
39
40
def main ():
40
41
"""Tags the current repository
@@ -66,7 +67,7 @@ def main():
66
67
branch_spec = 'origin/%s' % branch_name .decode ('utf-8' ).strip ()
67
68
subprocess .check_call (['git' , 'branch' , '--set-upstream-to' , branch_spec ])
68
69
print ('Committing the changelog & version' )
69
- subprocess .check_call (['git' , 'add' , 'src/auto_version/__version__.py' ])
70
+ subprocess .check_call (['git' , 'add' , VERSION_FILE ])
70
71
subprocess .check_call (['git' , 'add' , 'CHANGELOG.md' ])
71
72
subprocess .check_call (['git' , 'add' , 'docs/news/*' ])
72
73
message = ':checkered_flag: :newspaper: Releasing version %s\n [skip ci]' % version
0 commit comments