Compare commits
7 Commits
v2.3.0
..
23613d16b7
| Author | SHA1 | Date | |
|---|---|---|---|
| 23613d16b7 | |||
| 8cd1d56b4a | |||
| 6b8fe820aa | |||
| 2554810306 | |||
| 08029141d4 | |||
| a1123b361d | |||
| f4d2e551b5 |
@@ -34,6 +34,19 @@ jobs:
|
|||||||
|
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
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_file=$CHANGELOG_FILE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build Artifacts
|
- name: Build Artifacts
|
||||||
if: steps.tag.outputs.version
|
if: steps.tag.outputs.version
|
||||||
run: |
|
run: |
|
||||||
@@ -46,17 +59,17 @@ jobs:
|
|||||||
id: create_release
|
id: create_release
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ steps.tag.outputs.version }}"
|
VERSION="${{ steps.tag.outputs.version }}"
|
||||||
RESPONSE=$(curl -s -X POST \
|
CHANGELOG_FILE="${{ steps.changelog.outputs.changelog_file }}"
|
||||||
|
RESPONSE=$(jq -n \
|
||||||
|
--arg tag "v$VERSION" \
|
||||||
|
--arg name "wapp-v$VERSION" \
|
||||||
|
--rawfile body "$CHANGELOG_FILE" \
|
||||||
|
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}' \
|
||||||
|
| curl -s -X POST \
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"https://git.thewizardapprentice.com/api/v1/repos/${{ gitea.repository }}/releases" \
|
--data-binary @- \
|
||||||
-d '{
|
"https://git.thewizardapprentice.com/api/v1/repos/${{ gitea.repository }}/releases")
|
||||||
"tag_name": "v'"$VERSION"'",
|
|
||||||
"name": "wapp-v'"$VERSION"'",
|
|
||||||
"body": "Automated release for wapp-v'"$VERSION"'",
|
|
||||||
"draft": false,
|
|
||||||
"prerelease": false
|
|
||||||
}')
|
|
||||||
|
|
||||||
echo "$RESPONSE"
|
echo "$RESPONSE"
|
||||||
RELEASE_ID=$(echo $RESPONSE | jq -r '.id')
|
RELEASE_ID=$(echo $RESPONSE | jq -r '.id')
|
||||||
|
|||||||
@@ -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,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cp -r src wapp
|
cp -r src wapp
|
||||||
|
cp CHANGELOG.md wapp
|
||||||
|
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
import os
|
||||||
|
import re
|
||||||
|
import argparse
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
VERSION_HEADER = re.compile(r"\[\d+.\d+.\d+\]")
|
||||||
|
SCRIPT_DIR = Path(__file__).absolute().parent.parent
|
||||||
|
|
||||||
|
|
||||||
|
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]:
|
||||||
|
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:
|
||||||
|
version_changelog = SCRIPT_DIR / f"wapp-changelog-{version}.md"
|
||||||
|
with version_changelog.open("w") as outfile:
|
||||||
|
outfile.writelines(lines)
|
||||||
|
return str(version_changelog)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Reference in New Issue
Block a user