@@ -198,14 +198,16 @@ def seven_zip_compress(input_path, output_path):
198
198
def get_chapter_name_and_translation_from_git_tag ():
199
199
returned_chapter_name = None
200
200
translation = False
201
+ tag_fragments_debug = 'tag fragments not extracted - maybe missing GITHUB_REF?' #type: str
201
202
202
203
if GIT_TAG is None :
203
204
raise Exception (
204
205
"'github_actions' was selected, but environment variable GITHUB_REF was not set - are you sure you're running this script from Github Actions?"
205
206
)
206
207
else :
207
208
# Look for the chapter name to build in the git tag
208
- tag_fragments = [x .lower () for x in re .split (r"[\W_]" , GIT_REF )]
209
+ tag_fragments = [x .lower () for x in re .split (r"_" , GIT_REF )]
210
+ tag_fragments_debug = str (tag_fragments )
209
211
210
212
if "all" in tag_fragments :
211
213
returned_chapter_name = "all"
@@ -218,7 +220,7 @@ def get_chapter_name_and_translation_from_git_tag():
218
220
if "translation" in tag_fragments :
219
221
translation = True
220
222
221
- return returned_chapter_name , translation
223
+ return returned_chapter_name , translation , tag_fragments_debug
222
224
223
225
224
226
def get_build_variants (selected_chapter : str ) -> List [BuildVariant ]:
@@ -323,11 +325,12 @@ def save(self):
323
325
# Get chapter name from git tag if "github_actions" specified as the chapter
324
326
chapter_name = args .chapter
325
327
if chapter_name == "github_actions" :
326
- chapter_name , translation = get_chapter_name_and_translation_from_git_tag ()
328
+ chapter_name , translation , tag_fragments_debug = get_chapter_name_and_translation_from_git_tag ()
327
329
if chapter_name is None :
328
330
print (
329
- f">>>> WARNING: No chapter name (or 'all') was found in git tag { GIT_TAG } - skipping building .assets"
331
+ f">>>> WARNING: No chapter name was found in git tag { GIT_TAG } parsed as { tag_fragments_debug } - skipping building .assets"
330
332
)
333
+ print (f">>>> Should contain one of { chapter_to_build_variants .keys ()} or 'all'" )
331
334
exit (0 )
332
335
333
336
# NOTE: For now, translation archive output is enabled by default, as most of the time this script will be used for translators
0 commit comments