Skip to content

Commit f231827

Browse files
committed
fixed releasing from a branch
1 parent b73246f commit f231827

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

doc/source/fetch_changelogs.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ def fetch_changelog(section_name, release_name, github_rep, rel_changes_dir='/do
3030
['git', 'commit', '-m', f'fetched {section_name} changelog for {short(release_name)}', str(fpath)])
3131

3232

33-
def fetch_changelogs(release_name):
34-
fetch_changelog('editor', release_name, EDITOR_GITHUB_REP)
33+
def fetch_changelogs(release_name, branch='master'):
34+
fetch_changelog('editor', release_name, EDITOR_GITHUB_REP, branch=branch)
3535

36-
print(echocall(['git', 'log', 'upstream/master..HEAD']))
36+
print(echocall(['git', 'log', f'origin/{branch}..HEAD']))
3737
if yes('Are the above commits ready to be pushed?', default='n'):
3838
doechocall('Pushing changes to GitHub',
39-
['git', 'push', 'upstream', 'master', '--follow-tags'])
39+
['git', 'push', 'origin', branch, '--follow-tags'])
4040

4141

4242
if __name__ == '__main__':
4343
import sys
4444

4545
argv = sys.argv
4646
if len(argv) < 2:
47-
print(f"Usage: {argv[0]} release_name")
47+
print(f"Usage: {argv[0]} release_name [branch]")
4848
sys.exit()
4949

50-
fetch_changelogs(argv[1])
50+
fetch_changelogs(*argv[1:])

make_release.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ def update_metapackage(public_release, repository, release_name, **extra_kwargs)
4646
'--summary', "'Package installing larray and all sub-projects and optional dependencies'"])
4747

4848

49-
def merge_changelogs(build_dir, src_documentation, release_name, public_release, **extra_kwargs):
49+
def merge_changelogs(build_dir, src_documentation, release_name, public_release, branch='master', **extra_kwargs):
5050
chdir(join(build_dir, src_documentation))
5151

5252
if not public_release:
5353
return
5454

55-
check_call(['python', 'fetch_changelogs.py', release_name])
55+
check_call(['python', 'fetch_changelogs.py', release_name, branch])
5656

5757

5858
insert_step_func(merge_changelogs, msg='append changelogs from larray-editor project', before='update_changelog')

0 commit comments

Comments
 (0)