Skip to content

Commit

Permalink
Merge pull request #2278 from github/backport-v2.25.4-ccf74c947
Browse files Browse the repository at this point in the history
Merge releases/v3 into releases/v2
  • Loading branch information
henrymercer authored May 8, 2024
2 parents ceaec5c + 654d389 commit 4f0ceda
Show file tree
Hide file tree
Showing 65 changed files with 719 additions and 297 deletions.
20 changes: 17 additions & 3 deletions .github/update-release-branch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse
import datetime
import fileinput
import re
from github import Github
import json
Expand Down Expand Up @@ -171,6 +172,19 @@ def get_current_version():
with open('package.json', 'r') as f:
return json.load(f)['version']

# `npm version` doesn't always work because of merge conflicts, so we
# replace the version in package.json textually.
def replace_version_package_json(prev_version, new_version):
prev_line_is_codeql = False
for line in fileinput.input('package.json', inplace = True, encoding='utf-8'):
if prev_line_is_codeql and f'\"version\": \"{prev_version}\"' in line:
print(line.replace(prev_version, new_version), end='')
else:
prev_line_is_codeql = False
print(line, end='')
if '\"name\": \"codeql\",' in line:
prev_line_is_codeql = True

def get_today_string():
today = datetime.datetime.today()
return '{:%d %b %Y}'.format(today)
Expand Down Expand Up @@ -374,9 +388,9 @@ def main():
run_git('commit', '--no-edit')

# Migrate the package version number from a vLatest version number to a vOlder version number
print(f'Setting version number to {version}')
subprocess.check_output(['npm', 'version', version, '--no-git-tag-version'])
run_git('add', 'package.json', 'package-lock.json')
print(f'Setting version number to {version} in package.json')
replace_version_package_json(get_current_version(), version) # We rely on the `Update dependencies` workflow to update package-lock.json
run_git('add', 'package.json')

# 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}')
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th

Note that the only difference between `v2` and `v3` of the CodeQL Action is the node version they support, with `v3` running on node 20 while we continue to release `v2` to support running on node 16. For example `3.22.11` was the first `v3` release and is functionally identical to `2.22.11`. This approach ensures an easy way to track exactly which features are included in different versions, indicated by the minor and patch version numbers.

## 2.25.4 - 08 May 2024

- Update default CodeQL bundle version to 2.17.2. [#2270](https://github.com/github/codeql-action/pull/2270)

## 2.25.3 - 25 Apr 2024

- Update default CodeQL bundle version to 2.17.1. [#2247](https://github.com/github/codeql-action/pull/2247)
Expand Down
8 changes: 4 additions & 4 deletions lib/defaults.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.17.1",
"cliVersion": "2.17.1",
"priorBundleVersion": "codeql-bundle-v2.17.0",
"priorCliVersion": "2.17.0"
"bundleVersion": "codeql-bundle-v2.17.2",
"cliVersion": "2.17.2",
"priorBundleVersion": "codeql-bundle-v2.17.1",
"priorCliVersion": "2.17.1"
}
8 changes: 4 additions & 4 deletions lib/feature-flags.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/feature-flags.js.map

Large diffs are not rendered by default.

76 changes: 67 additions & 9 deletions lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upload-lib.js.map

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions lib/upload-lib.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4f0ceda

Please sign in to comment.