25
25
LARRAY_USERS_GROUP = "larray-users@googlegroups.com"
26
26
27
27
28
- def update_metapackage (context ):
29
- if not context [ ' public_release' ] :
28
+ def update_metapackage (public_release , repository , release_name , ** extra_kwargs ):
29
+ if not public_release :
30
30
return
31
31
32
- chdir (context [ ' repository' ] )
33
- version = short (context [ ' release_name' ] )
32
+ chdir (repository )
33
+ version = short (release_name )
34
34
35
35
# TODO: this should be echocall(redirect_stdout=False)
36
36
print (f'Updating larrayenv metapackage to version { version } ' )
@@ -46,19 +46,29 @@ def update_metapackage(context):
46
46
'--summary' , "'Package installing larray and all sub-projects and optional dependencies'" ])
47
47
48
48
49
- def merge_changelogs (config ):
50
- if config ['src_documentation' ] is not None :
51
- chdir (join (config ['build_dir' ], config ['src_documentation' ]))
49
+ def merge_changelogs (build_dir , src_documentation , release_name , public_release , ** extra_kwargs ):
50
+ chdir (join (build_dir , src_documentation ))
52
51
53
- if not config [ ' public_release' ] :
54
- return
52
+ if not public_release :
53
+ return
55
54
56
- check_call (['python' , 'merge_changelogs.py' , config [ ' release_name' ] ])
55
+ check_call (['python' , 'merge_changelogs.py' , release_name ])
57
56
58
57
59
58
insert_step_func (merge_changelogs , msg = 'append changelogs from larray-editor project' , before = 'update_changelog' )
60
59
61
60
61
+ # * the goal is to be able to fetch the editor changelog several times during development (manually) and automatically
62
+ # during release
63
+ # * we need to commit either a merged changelog or changes.rst which includes both and a copy of the editor changelog
64
+ # because the doc is built on rtd
65
+ # * the documentation must be buildable at any point (before a merge), so I need next_release to add an empty file
66
+
67
+ # def merge_changelogs(release_name):
68
+ # include_changelog('CORE', release_name, LARRAY_GITHUB_REP, reset=True)
69
+ # include_changelog('EDITOR', release_name, EDITOR_GITHUB_REP)
70
+
71
+
62
72
# TODO : move to larrayenv project
63
73
def announce_new_release (release_name ):
64
74
import win32com .client as win32
@@ -108,9 +118,9 @@ def announce_new_release(release_name):
108
118
109
119
local_repository = abspath (dirname (__file__ ))
110
120
if argv [1 ] == '-m' or argv [1 ] == '--meta' :
111
- local_config = set_config (local_repository , PACKAGE_NAME , SRC_CODE , argv [2 ], branch = 'master' ,
121
+ local_config = set_config (local_repository , PACKAGE_NAME , SRC_CODE , release_name = argv [2 ], branch = 'master' ,
112
122
src_documentation = SRC_DOC , tmp_dir = TMP_PATH )
113
- update_metapackage (local_config )
123
+ update_metapackage (** local_config )
114
124
elif argv [1 ] == '-a' or argv [1 ] == '--announce' :
115
125
no ("Is metapackage larrayenv updated?" )
116
126
announce_new_release (argv [2 ])
0 commit comments