Compare commits

...

5 Commits

Author SHA1 Message Date
abdelrahman 6b8fe820aa Remove empty line for testing
Release / release (push) Failing after 1s
2026-08-30 13:49:15 +01:00
abdelrahman 2554810306 Use python3 in release workflow
Release / release (push) Failing after 3s
2026-08-30 13:48:24 +01:00
abdelrahman 08029141d4 Extract version changelog in release process
Release / release (push) Failing after 4s
2026-08-30 13:45:40 +01:00
abdelrahman a1123b361d Include CHANGELOG file in release packages 2026-08-30 13:45:21 +01:00
abdelrahman f4d2e551b5 Add CHANGELOG 2026-08-30 12:39:03 +01:00
4 changed files with 107 additions and 1 deletions
+15 -1
View File
@@ -34,6 +34,19 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Extract version changelog
id: changelog
run: |
VERSION=$(cat VERSION | tr -d '[:space:]') # read version and trim whitespace
CHANGELOG_FILE=$(python3 scripts/get_changelog.py $VERSION)
if [[ $? != 0 ]]; then
echo "No changelog found for version $VERSION"
exit 1
fi
echo "changelog=$(cat $CHANGELOG_FILE)" >> $GITHUB_OUTPUT
- name: Build Artifacts
if: steps.tag.outputs.version
run: |
@@ -46,6 +59,7 @@ jobs:
id: create_release
run: |
VERSION="${{ steps.tag.outputs.version }}"
CHANGELOG="${{ steps.changelog.outputs.changelog }}"
RESPONSE=$(curl -s -X POST \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: application/json" \
@@ -53,7 +67,7 @@ jobs:
-d '{
"tag_name": "v'"$VERSION"'",
"name": "wapp-v'"$VERSION"'",
"body": "Automated release for wapp-v'"$VERSION"'",
"body": "'"$CHANGELOG"'",
"draft": false,
"prerelease": false
}')
+34
View File
@@ -0,0 +1,34 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [2.3.0] - 2026-08-29
### Added
- Compiler detection macros:
- `WP_PLATFORM_CLANG` for the clang compiler
- `WP_PLATFORM_CLANGPP` for the clang++ compiler
- `WP_PLATFORM_CLANG_MAJOR` Major version number for the clang/clang++ compiler
- `WP_PLATFORM_CLANG_MINOR` Minor version number for the clang/clang++ compiler
- `WP_PLATFORM_CLANG_PATCH` Patch version number for the clang/clang++ compiler
- `WP_PLATFORM_GCC` for the gcc compiler
- `WP_PLATFORM_GPP` for the g++ compiler
- `WP_PLATFORM_GCC_MAJOR` Major version number for the gcc/g++ compiler
- `WP_PLATFORM_GCC_MINOR` Minor version number for the gcc/g++ compiler
- `WP_PLATFORM_GCC_PATCH` Patch version number for the gcc/g++ compiler
- `WP_PLATFORM_MSVC` for Microsoft's Visual C++ compiler
- `WP_PLATFORM_MSVC_FULL_VERSION` Full version string for the MSVC compiler
- `WP_PLATFORM_MSVC_VERSION` Version string for the MSVC compiler
- Generic `WpStream` struct to wrap a stream of data
- `WpVoidPtrStream`, `WpC8Stream`, `WpC16Stream`, `WpC32Stream`, `WpU8Stream`, `WpU16Stream`, `WpU32Stream`, `WpU64Stream`, `WpB8Stream`, `WpI8Stream`, `WpI16Stream`, `WpI32Stream`, `WpI64Stream`, `WpF32Stream`, `WpF64Stream`, `WpF128Stream`, `WpUptrStream`, `WpIptrStream` and `WpStr8Stream` aliases for `WpStream` for readability
- Utilities for working with data streams:
- `wpStreamAtEnd`
- `wpStreamHasNext`
- `wpStreamPeek`
- `wpStreamConsume`
+1
View File
@@ -1,6 +1,7 @@
#!/bin/bash
cp -r src wapp
cp CHANGELOG.md wapp
mkdir -p dist
+57
View File
@@ -0,0 +1,57 @@
import os
import re
import argparse
from pathlib import Path
from tempfile import mkstemp
VERSION_HEADER = re.compile(r"\[\d+.\d+.\d+\]")
def main():
parser = argparse.ArgumentParser()
parser.add_argument("version")
args = parser.parse_args()
changelog = get_changelog(args.version)
outfilename = save_changelog(args.version, changelog)
print(outfilename)
def get_changelog(version: str) -> list[str]:
script_dir = Path(__file__).absolute().parent.parent
changelog = script_dir / "CHANGELOG.md"
with changelog.open("r") as infile:
lines = infile.readlines()
start = -1
end = -1
for i, line in enumerate(lines):
if start == -1:
match = re.search(version, line)
if match is None:
continue
start = i
else:
match = VERSION_HEADER.search(line)
if match is not None:
end = i
break
if start == -1:
exit(1)
return lines[start:end] if end > -1 else lines[start:]
def save_changelog(version: str, lines: list[str]) -> str:
fd, name = mkstemp(prefix=f"wapp-changelog-{version}-", text=True)
os.write(fd, "".join(lines).encode("utf-8"))
os.close(fd)
return name
if __name__ == "__main__":
main()