|
96 | 96 | "Makefile.am", |
97 | 97 | "install.sh", |
98 | 98 | "debian/copyright", |
99 | | - "debian/copyright", |
| 99 | + "debian/manpage.xml", |
100 | 100 | "doc/Command_Index_User.tex", |
101 | 101 | "doc/Makefile.am", |
102 | 102 | "doc/GregorioRef.tex", |
@@ -327,7 +327,7 @@ def replace_version(version_obj): |
327 | 327 | result.append(newline) |
328 | 328 | else: |
329 | 329 | result.append(line) |
330 | | - with open('CHANGELOG.md','w') as outfile: |
| 330 | + with open('CHANGELOG.md', 'w') as outfile: |
331 | 331 | outfile.write(''.join(result)) |
332 | 332 | sys.exit(0) |
333 | 333 |
|
@@ -428,20 +428,26 @@ def do_release(version_obj, not_interactive): |
428 | 428 | def copyright_year(): |
429 | 429 | "Check and update copyright year as needed" |
430 | 430 | fileyear = linecache.getline(VERSION_FILE, 2).strip() |
| 431 | + def year_range(matchobj): |
| 432 | + "Check and add a year range to the copyright" |
| 433 | + if matchobj.group(1) is not None: |
| 434 | + return re.sub(fileyear, CURRENTYEAR, matchobj.group(0)) |
| 435 | + return re.sub(fileyear, fileyear+'-'+CURRENTYEAR, matchobj.group(0)) |
| 436 | + |
431 | 437 | if int(fileyear) != int(CURRENTYEAR): |
432 | 438 | print('Updating copyright year.') |
433 | 439 | for myfile in COPYRIGHT_FILES: |
434 | 440 | result = [] |
435 | 441 | with open(myfile, 'r') as infile: |
436 | 442 | for line in infile: |
437 | 443 | if re.search(r'[C|c]opyright.*Gregorio Project', line): |
438 | | - result.append(re.sub(fileyear, CURRENTYEAR, line)) |
| 444 | + result.append(re.sub(r'(\d{4}-)?(\d{4})', year_range, line)) |
439 | 445 | elif re.search(r'[C|c]opyright.*Elie Roux', line): |
440 | | - result.append(re.sub(fileyear, CURRENTYEAR, line)) |
| 446 | + result.append(re.sub(r'(\d{4}-)?(\d{4})', year_range, line)) |
441 | 447 | elif re.search(r'[C|c]opyright.*Richard Chonak', line): |
442 | | - result.append(re.sub(fileyear, CURRENTYEAR, line)) |
| 448 | + result.append(re.sub(r'(\d{4}-)?(\d{4})', year_range, line)) |
443 | 449 | elif re.search(r'[C|c]opyright.*Jakub Jelinek', line): |
444 | | - result.append(re.sub(fileyear, CURRENTYEAR, line)) |
| 450 | + result.append(re.sub(r'(\d{4}-)?(\d{4})', year_range, line)) |
445 | 451 | else: |
446 | 452 | result.append(line) |
447 | 453 | with open(myfile, 'w') as outfile: |
|
0 commit comments