forked from Chatterino/chatterino2
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into chatterino7
- Loading branch information
Showing
118 changed files
with
4,325 additions
and
4,208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
from datetime import datetime, timezone | ||
import os | ||
import subprocess | ||
import re | ||
|
||
LINE_REGEX = re.compile( | ||
r"""(?x) | ||
^(?P<commit>[A-Fa-f0-9]+)\s+ | ||
\( | ||
<(?P<email>[^>]+)>\s+ | ||
(?P<date>[^\s]+\s[^\s]+\s[^\s]+)\s+ | ||
(?P<line>\d+) | ||
\)\s | ||
(?P<content>.*)$ | ||
""" | ||
) | ||
VERSION_REGEX = re.compile(r"^#+\s*v?\d") | ||
|
||
# contains lines in the form of | ||
# {commit-sha} (<{email}>\s+{date}\s+{line-no}) {line} | ||
p = subprocess.run( | ||
["git", "blame", "-e", "--date=iso", "../CHANGELOG.md"], | ||
cwd=os.path.dirname(os.path.realpath(__file__)), | ||
text=True, | ||
check=True, | ||
capture_output=True, | ||
) | ||
|
||
unreleased_lines: list[tuple[datetime, str]] = [] | ||
for line in p.stdout.splitlines(): | ||
if not line: | ||
continue | ||
m = LINE_REGEX.match(line) | ||
assert m, f"Failed to match '{line}'" | ||
content = m.group("content") | ||
|
||
if not content: | ||
continue | ||
if content.startswith("#"): | ||
if VERSION_REGEX.match(content): | ||
break | ||
continue # ignore lines with '#' | ||
|
||
d = datetime.fromisoformat(m.group("date")) | ||
d = d.astimezone(tz=timezone.utc) | ||
content = content.replace("- ", f"- [{d.strftime('%Y-%m-%d')}] ", 1) | ||
unreleased_lines.append((d, content)) | ||
|
||
unreleased_lines.sort(key=lambda it: it[0], reverse=True) | ||
|
||
if len(unreleased_lines) == 0: | ||
print("No changes since last release.") | ||
|
||
for _, line in unreleased_lines[:5]: | ||
print(line) | ||
|
||
if len(unreleased_lines) > 5: | ||
print("<details><summary>More Changes</summary>\n") | ||
for _, line in unreleased_lines[5:]: | ||
print(line) | ||
print("</details>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,15 @@ jobs: | |
skip-crashpad: false | ||
build-appimage: true | ||
build-deb: true | ||
- os: ubuntu-24.04 | ||
container: ghcr.io/chatterino/chatterino2-build-ubuntu-24.04:latest | ||
qt-version: 6.6.1 | ||
force-lto: false | ||
plugins: true | ||
skip-artifact: false | ||
skip-crashpad: false | ||
build-appimage: false | ||
build-deb: true | ||
env: | ||
C2_ENABLE_LTO: ${{ matrix.force-lto }} | ||
C2_PLUGINS: ${{ matrix.plugins }} | ||
|
@@ -385,14 +394,30 @@ jobs: | |
working-directory: release-artifacts | ||
shell: bash | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Format changes | ||
id: format-changes | ||
run: | | ||
delimiter=$(openssl rand -hex 32) | ||
{ | ||
echo "changelog<<$delimiter" | ||
python3 ./.CI/format-recent-changes.py | ||
echo $delimiter | ||
} >> "$GITHUB_OUTPUT" | ||
shell: bash | ||
|
||
- name: Create release | ||
uses: ncipollo/[email protected] | ||
with: | ||
replacesArtifacts: true | ||
allowUpdates: true | ||
artifactErrorsFailBuild: true | ||
artifacts: "release-artifacts/*" | ||
body: ${{ github.event.head_commit.message }} | ||
body: ${{ steps.format-changes.outputs.changelog }} | ||
prerelease: true | ||
name: Nightly Release | ||
tag: nightly-build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.