Apply suggestions from code review

Co-authored-by: Henry Mercer <henry.mercer@me.com>
This commit is contained in:
Nick Fyson
2023-12-06 11:40:07 +00:00
committed by GitHub
parent 65a2bb528e
commit 3537bea580
5 changed files with 15 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
import argparse
import os, json
import json
import os
import subprocess
# Name of the remote

View File

@@ -1,5 +1,5 @@
name: 'Prepare release job'
description: 'Executed preparatory steps before update a release branch'
description: 'Prepare for updating a release branch'
runs:
using: "composite"

View File

@@ -317,7 +317,7 @@ def main():
subprocess.check_output(['npm', 'version', version, '--no-git-tag-version'])
run_git('add', 'package.json', 'package-lock.json')
# Migrate the changelog notes from v2 version numbers to v1 version numbers
# Migrate the changelog notes from vLatest version numbers to vOlder version numbers
print(f'Migrating changelog notes from v{source_branch_major_version} to v{target_branch_major_version}')
subprocess.check_output(['sed', '-i', f's/^## {source_branch_major_version}\./## {target_branch_major_version}./g', 'CHANGELOG.md'])

View File

@@ -1,5 +1,5 @@
# This workflow runs after a merge to any release branch of the action. It:
# 1. Tags the merge commit on the release branch that represents the new release with n `vN.x.y`
# 1. Tags the merge commit on the release branch that represents the new release with an `vN.x.y`
# tag
# 2. Updates the `vN` tag to refer to this merge commit.
# 3. Iff vN == vLatest, merges any changes from the release back into the main branch.