Skip to content

Commit 384f6ae

Browse files
author
LocalIdentity
committed
Merge branch 'dev'
2 parents 8c60cab + 70804a2 commit 384f6ae

File tree

327 files changed

+238034
-3394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+238034
-3394
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@
6161
#*.PDF diff=astextplain
6262
#*.rtf diff=astextplain
6363
#*.RTF diff=astextplain
64+
65+
###############################################################################
66+
# Executable files - preserve execution permissions on Unix systems
67+
# (https://git-scm.com/docs/gitattributes#_executable)
68+
###############################################################################
69+
runtime/*.exe binary

.github/tweak_changelogs.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/bash
2+
3+
RELEASE_VERSION="$1"
4+
5+
# Delete until and including the first line containing "<!-- Release notes generated"
6+
sed -i '1,/^<!-- Release notes generated/d' temp_change.md
7+
8+
# Check if there is more than one non-empty line (the full changelog line) before we continue
9+
if [ $(grep -c '^[[:space:]]*[^[:space:]]' temp_change.md) -le 1 ]; then
10+
echo "No changes to release $RELEASE_VERSION"
11+
rm temp_change.md
12+
exit 1
13+
fi
14+
15+
# Remove all CR characters from all changelog files
16+
sed -i 's/\r//g' temp_change.md CHANGELOG.md changelog.txt
17+
18+
# Reverse the order of lines in the file (last line becomes first, etc.)
19+
sed -i '1h;1d;$!H;$!d;G' temp_change.md
20+
# Convert "**Full Changelog**: URL" format to markdown link format "[Full Changelog](URL)"
21+
sed -i -re 's/\*\*Full Changelog\*\*: (.*)/\[Full Changelog\]\(\1\)\n/' temp_change.md
22+
# Delete everything from "## New Contributors" line to the end of file
23+
sed -i '/## New Contributors/,$d' temp_change.md
24+
# Convert GitHub changelog entries to markdown format
25+
# "* description by (@username1, @username2) in #1310, #1311" → "- description #1310, #1311 (@username1, @username2)"
26+
sed -i -re 's/^\*\s(.*)\sby\s\(?(@[^)]*[^) ])\)?\s+in\s+(.*)/- \1 \3 (\2)/' temp_change.md
27+
# Convert @usernames to github links
28+
# "(@username1, @username2)" → "([username1](https://github.com/username1), [username2](https://github.com/username2))"
29+
sed -i -re 's/@([a-zA-Z0-9_-]+)/[\1](https:\/\/github.com\/\1)/g' temp_change.md
30+
# Convert full PR URLs to linked format
31+
# "https://github.com/repo/pull/1310" → "[\#1310](https://github.com/repo/pull/1310)"
32+
sed -i -re 's/(https:\/\/[^) ]*\/pull\/([0-9]+))/[\\#\2](\1)/g' temp_change.md
33+
34+
# Username substitutions for preferred display names
35+
sed -i 's/\[Quotae/\[Quote_a/' temp_change.md
36+
sed -i 's/\[learn2draw/\[Lexy/' temp_change.md
37+
sed -i 's/\[Voronoff/\[Tom Clancy Is Dead/' temp_change.md
38+
sed -i 's/\[PJacek/\[TPlant/' temp_change.md
39+
sed -i 's/\[justjuangui/\[trompetin17/' temp_change.md
40+
41+
cp temp_change.md changelog_temp.txt
42+
# Append existing CHANGELOG.md content (excluding first line) to temp_change.md
43+
cat CHANGELOG.md | sed '1d' >> temp_change.md
44+
# Create new CHANGELOG.md with header containing version and date, followed by processed changes
45+
printf "# Changelog\n\n## [$RELEASE_VERSION](https://github.com/PathOfBuildingCommunity/PathOfBuilding-PoE2/tree/$RELEASE_VERSION) ($(date +'%Y/%m/%d'))\n\n" | cat - temp_change.md > CHANGELOG.md
46+
# Convert changelog entries from markdown link format to simplified "* description (username)" format
47+
# First remove all PR links
48+
sed -i -re 's/( \()?\[\\#[0-9]+\]\([^)]*\),? ?\)?//g' changelog_temp.txt
49+
# Remove markdown link formatting from usernames in parentheses
50+
sed -i -re 's/\[([^]]*)\]\(https:\/\/github\.com\/[^)]*\)/\1/g' changelog_temp.txt
51+
# Create new changelog format: add version header, remove lines 2-3, format section headers, remove ## headers with following line, prepend to existing changelog
52+
echo "VERSION[${RELEASE_VERSION#v}][$(date +'%Y/%m/%d')]" | cat - changelog_temp.txt | sed '2,3d' | sed -re 's/^### (.*)/\n--- \1 ---/' | sed -e '/^##.*/,+1 d' | cat - changelog.txt > changelog_new.txt
53+
mv changelog_new.txt changelog.txt
54+
55+
# Normalize line endings to CRLF for all output files to ensure consistent checksums with Windows
56+
sed -i 's/\r*$/\r/' CHANGELOG.md changelog.txt
57+
58+
# Clean up temporary files
59+
rm temp_change.md
60+
rm changelog_temp.txt

.github/workflows/backport_receive.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Update code with code from PoB2
2+
run-name: ${{ github.event.client_payload.title }}
23

34
on:
45
repository_dispatch:
@@ -14,15 +15,17 @@ jobs:
1415
with:
1516
ref: 'dev'
1617
- name: Apply patch
18+
continue-on-error: true
1719
run: |
18-
curl -L ${{ github.event.client_payload.patch_url }} | git apply -v --index
20+
curl -L ${{ github.event.client_payload.patch_url }} | patch -p1 --merge --verbose -f -l --no-backup-if-mismatch
1921
- name: Create Pull Request
2022
uses: peter-evans/create-pull-request@v5
2123
with:
2224
title: "[pob2-port] ${{ github.event.client_payload.title }}"
2325
branch: pob2-pr-${{ github.event.client_payload.id }}
2426
body: |
2527
${{ github.event.client_payload.msg }}
28+
committer: ${{ github.event.client_payload.name || github.event.client_payload.user }} <${{ github.event.client_payload.user }}@users.noreply.github.com>
2629
author: ${{ github.event.client_payload.name || github.event.client_payload.user }} <${{ github.event.client_payload.user }}@users.noreply.github.com>
2730
commit-message: ${{ github.event.client_payload.msg }}
2831
labels: ${{ github.event.client_payload.labels }}

.github/workflows/beta.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,36 @@ jobs:
1616
uses: actions/checkout@v3
1717
with:
1818
ref: 'dev'
19+
fetch-depth: 0
1920
- name: Configure bot user
2021
run: |
2122
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
2223
git config --global user.name "github-actions[bot]"
24+
- name: Generate Release notes
25+
run: |
26+
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
27+
# Delete existing beta draft if it exists
28+
if gh release view beta >/dev/null 2>&1; then
29+
gh release delete beta --yes
30+
fi
31+
# Create new beta draft release with generated notes
32+
# Make sure the latest tag is correct, even if the current commit is already tagged
33+
LATEST_TAG=$(git describe --tags --abbrev=0)
34+
gh release create beta --title "Beta Release" --draft --generate-notes --notes-start-tag "$LATEST_TAG"
35+
gh release view beta > temp_change.md
36+
- name: Tweak changelogs
37+
id: tweak-changelogs
38+
continue-on-error: true
39+
run: |
40+
# Remove carriage returns to be able to run the script
41+
sed -i 's/\r$//' .github/tweak_changelogs.sh
42+
chmod +x .github/tweak_changelogs.sh
43+
.github/tweak_changelogs.sh beta
44+
# The hash suffix will help identifying if the beta version is up-to-date
45+
- name: Add commit hash suffix to manifest version
46+
if: steps.tweak-changelogs.outcome == 'success'
47+
run: |
48+
sed -i "s/<Version number=\"\([^\"]*\)\"/<Version number=\"\1-$(git rev-parse --short HEAD)\"/g" manifest.xml
2349
- name: Update manifest.xml
2450
run: python3 update_manifest.py --quiet --in-place
2551
- name: Push to beta branch

.github/workflows/installer.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Create new installer
22
on:
33
release:
44
types: [published]
5+
workflow_dispatch:
6+
inputs:
7+
tag_name:
8+
description: 'Tag to build'
9+
required: true
10+
default: 'v2.x.x'
511
env:
612
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
713
jobs:
@@ -14,9 +20,12 @@ jobs:
1420
repository: 'PathOfBuildingCommunity/PathOfBuilding-Installer'
1521
ref: 'master'
1622
ssh-key: '${{ secrets.POB_INSTALLER_KEY }}'
23+
- name: Install NSIS
24+
run: |
25+
choco install nsis --yes
26+
echo "C:\Program Files (x86)\NSIS" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1727
- name: Create installer
1828
run: 'python3 make_release.py --game-version 1'
1929
- name: Upload artifact
2030
run: >
21-
gh release upload ${{ github.event.release.tag_name }} (Get-ChildItem Dist -File).FullName --clobber -R ${{ github.repository }};
22-
31+
gh release upload ${{ github.event.release.tag_name || github.event.inputs.tag_name }} (Get-ChildItem Dist -File).FullName --clobber -R ${{ github.repository }};

.github/workflows/release.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,11 @@ jobs:
2929
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token;
3030
gh release view $(basename ${{ github.event.inputs.releaseNoteUrl }}) > temp_change.md
3131
- name: Tweak changelogs
32-
run: >
33-
sed -i '1,10d' temp_change.md;
34-
sed -i '1h;1d;$!H;$!d;G' temp_change.md;
35-
sed -i -re 's/\*\*Full Changelog\*\*: (.*)/\[Full Changelog\]\(\1\)\n/' temp_change.md;
36-
sed -i '/## New Contributors/,$d' temp_change.md;
37-
sed -i -re 's/^\*(.*)\sby\s@(.*)\sin\s(.*\/pull\/)(.*)\r?/-\1 [\\#\4](\3\4) ([\2](https:\/\/github.com\/\2))/' temp_change.md;
38-
sed -i 's/\[Quotae/\[Quote_a/' temp_change.md;
39-
sed -i 's/\[learn2draw/\[Lexy/' temp_change.md;
40-
sed -i 's/\[Voronoff/\[Tom Clancy Is Dead/' temp_change.md;
41-
sed -i 's/\[PJacek/\[TPlant/' temp_change.md;
42-
sed -i 's/\[justjuangui/\[trompetin17/' temp_change.md;
43-
sed -i 's/\r//g' temp_change.md;
44-
cp temp_change.md changelog_temp.txt;
45-
cat CHANGELOG.md | tr \\r \\n | sed '1d' >> temp_change.md;
46-
printf "# Changelog\n\n## [v${{ github.event.inputs.releaseVersion }}](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v${{ github.event.inputs.releaseVersion }}) ($(date +'%Y/%m/%d'))\n\n" | cat - temp_change.md > CHANGELOG.md;
47-
48-
sed -i -re 's/^- (.*) \[.*\) \(\[(.*)\]\(.*/* \1 (\2)/' changelog_temp.txt;
49-
echo "VERSION[${{ github.event.inputs.releaseVersion }}][`date +'%Y/%m/%d'`]" | cat - changelog_temp.txt | tr -d \\r | sed '2,3d' | sed -re 's/^### (.*)/\n--- \1 ---/' | sed -e '/^##.*/,+1 d' | cat - changelog.txt > changelog_new.txt;
50-
rm temp_change.md;
51-
rm changelog_temp.txt;
52-
mv changelog_new.txt changelog.txt
32+
run: |
33+
# Remove carriage returns to be able to run the script
34+
sed -i 's/\r$//' .github/tweak_changelogs.sh
35+
chmod +x .github/tweak_changelogs.sh
36+
.github/tweak_changelogs.sh "v${{ github.event.inputs.releaseVersion }}"
5337
- name: Create Pull Request
5438
uses: peter-evans/create-pull-request@v5
5539
with:

.github/workflows/spellcheck.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
name: 'Spell Checker'
1+
name: Spell Checker
22

33
on:
4+
push:
5+
branches: [ dev ]
46
pull_request:
57
branches: [ dev ]
68
workflow_dispatch:
@@ -13,27 +15,26 @@ on:
1315
jobs:
1416
spellcheck:
1517
runs-on: ubuntu-latest
16-
env:
18+
env:
1719
CONFIG_URL: https://raw.githubusercontent.com/Nightblade/pob-dict/main
1820
steps:
19-
2021
- name: Checkout
21-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
2223
with:
2324
ref: ${{ inputs.ref }}
2425

2526
- name: Fetch config file and dictionaries
26-
run: |
27-
curl --silent --show-error --parallel --remote-name-all \
28-
${{ env.CONFIG_URL }}/cspell.json \
29-
${{ env.CONFIG_URL }}/pob-dict.txt \
30-
${{ env.CONFIG_URL }}/poe-dict.txt \
31-
${{ env.CONFIG_URL }}/ignore-dict.txt \
32-
${{ env.CONFIG_URL }}/extra-en-dict.txt \
27+
run:
28+
curl --silent --show-error --parallel --remote-name-all
29+
${{ env.CONFIG_URL }}/cspell.json
30+
${{ env.CONFIG_URL }}/pob-dict.txt
31+
${{ env.CONFIG_URL }}/poe-dict.txt
32+
${{ env.CONFIG_URL }}/ignore-dict.txt
33+
${{ env.CONFIG_URL }}/extra-en-dict.txt
3334
${{ env.CONFIG_URL }}/contribs-dict.txt
3435

3536
- name: Run cspell
36-
uses: streetsidesoftware/cspell-action@v6.9.0
37+
uses: streetsidesoftware/cspell-action@v7
3738
with:
3839
files: '**' # needed as workaround for non-incremental runs (overrides in config still work ok)
3940
config: "cspell.json"

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,21 @@ jobs:
1515
- name: Run tests
1616
run: busted --lua=luajit
1717
- name: Report coverage
18+
continue-on-error: true # May fail on server errors (of coveralls.io)
1819
run: cd src; luacov-coveralls --repo-token=${{ secrets.github_token }} -e TestData -e Data -e runtime
20+
check_modcache:
21+
runs-on: ubuntu-latest
22+
container: ghcr.io/pathofbuildingcommunity/pathofbuilding-tests:latest
23+
steps:
24+
- name: Install git dependency
25+
run: apk add git
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- name: Regenerate ModCache
29+
env:
30+
LUA_PATH: ../runtime/lua/?.lua;../runtime/lua/?/init.lua
31+
REGENERATE_MOD_CACHE: 1
32+
run: cd src; luajit HeadlessWrapper.lua
33+
- run: git config --global --add safe.directory $(pwd)
34+
- name: Check if the generated ModCache is different
35+
run: git diff --exit-code src/Data/ModCache.lua

.github/workflows/update-simple-graphic.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
fileName: SimpleGraphicDLLs-x64-windows.tar
1919
extract: true
2020
out-file-path: runtime
21+
- name: Delete .tar file
22+
run: rm runtime/SimpleGraphicDLLs-x64-windows.tar
2123
- name: Create Pull Request
2224
uses: peter-evans/create-pull-request@v5
2325
with:
@@ -26,4 +28,4 @@ jobs:
2628
body: |
2729
Update DLLs to SimpleGraphic-${{ github.event.client_payload.tag }} from ${{ github.event.client_payload.release_link }}
2830
commit-message: Update DLLs to SimpleGraphic-${{ github.event.client_payload.tag }}
29-
31+

0 commit comments

Comments
 (0)