Skip to content

Commit 770fbd2

Browse files
committed
Fixed version file path
1 parent af05570 commit 770fbd2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/tag_and_release.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@ def git_url_ssh_to_https(url):
2424
"""Convert a git url
2525
2626
url will look like
27-
https://github.com/ARMmbed/autoversion.git
27+
https://github.com/ARMmbed/snippet.git
2828
or
29-
git@github.com:ARMmbed/autoversion.git
29+
git@github.com:ARMmbed/snippet.git
3030
we want:
31-
https://${GITHUB_TOKEN}@github.com/ARMmbed/autoversion.git
31+
https://${GITHUB_TOKEN}@github.com/ARMmbed/snippet.git
3232
"""
3333
path = url.split('github.com', 1)[1][1:].strip()
3434
new = 'https://{GITHUB_TOKEN}@github.com/%s' % path
3535
print('rewriting git url to: %s' % new)
3636
return new.format(GITHUB_TOKEN=os.getenv('GITHUB_TOKEN'))
3737

38+
VERSION_FILE='src/snippet/_version.py'
3839

3940
def main():
4041
"""Tags the current repository
@@ -66,7 +67,7 @@ def main():
6667
branch_spec = 'origin/%s' % branch_name.decode('utf-8').strip()
6768
subprocess.check_call(['git', 'branch', '--set-upstream-to', branch_spec])
6869
print('Committing the changelog & version')
69-
subprocess.check_call(['git', 'add', 'src/auto_version/__version__.py'])
70+
subprocess.check_call(['git', 'add', VERSION_FILE])
7071
subprocess.check_call(['git', 'add', 'CHANGELOG.md'])
7172
subprocess.check_call(['git', 'add', 'docs/news/*'])
7273
message = ':checkered_flag: :newspaper: Releasing version %s\n[skip ci]' % version

0 commit comments

Comments
 (0)