Skip to content

Commit

Permalink
Merge pull request #46 from Aetf/release-9
Browse files Browse the repository at this point in the history
Release 9.0.0
  • Loading branch information
Aetf authored Jun 15, 2022
2 parents a52b7ef + a195e9f commit 3292791
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 15 deletions.
45 changes: 30 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
# The way this works is a little weird. But basically, the create-release job
# runs purely to initialize the GitHub release itself. Once done, the upload
# URL of the release is saved as an artifact.
#
# The build-release job runs only once create-release is finished. It gets
# the release upload URL by downloading the corresponding artifact (which was
# uploaded by create-release). It then builds the release executables for each
# supported platform and attaches them as release assets to the previously
# created release.
#
# The key here is that we create the release only once.
#
# Adapted from: https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml

name: release
on:
push:
# Enable when testing release infrastructure on a branch.
branches:
- build
- release-*
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
Expand All @@ -31,13 +17,42 @@ jobs:
python-version: '3.x'
- name: Install meson
run: pip install meson ninja
- name: Install dependencies
run: |
sudo apt-get install -y libudev-dev libxkbcommon-dev libdrm-dev libgbm-dev libegl1-mesa-dev libgles-dev libpango1.0-dev libsystemd-dev
- name: Install libtsm
run: |
pip install cmake
curl -L -o libtsm.tar.gz $(curl -s https://api.github.com/repos/Aetf/libtsm/releases/latest \
| grep "tarball_url" \
| awk '{ print $2 }' \
| sed 's/,$//' \
| sed 's/"//g' )
mkdir libtsm
tar -xf libtsm.tar.gz -C libtsm --strip 1
cd libtsm
cmake -Bbuilddir
cmake --build builddir
sudo cmake --install builddir
- name: Meson setup
run: meson setup builddir/
- name: Create source distribution
# no unit tests yet
run: meson dist -C builddir/ --no-tests
- name: Create release note
run: tools/extract_release_note.py NEWS ${{ github.workspace }}-release-note.txt
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: release-files
path: |
builddir/meson-dist/*
${{ github.workspace }}-release-note.txt
- name: Release
uses: softprops/action-gh-release@v1
# only actually create the release when run on tag
if: startsWith(github.ref, 'refs/tags/')
with:
files: builddir/meson-dist/*
body_path: ${{ github.workspace }}-release-note.txt

21 changes: 21 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
= KMSCON Release News =

CHANGES WITH 9.0.0:
* Modernized build system from autotools to meson.

* Note that many features rely on newer version of libtsm,
thus we now requires libtsm >= 4.0.0 from the maintained fork at
https://github.com/Aetf/libtsm.

* New features!
- Custom palette support (#39)
- Compose (dead-key) support (#36)
- 24bit fbdev support (#8)
- Detect XKB layout from localed (#7)
- Underline and italic font (#3)

* Bug fixes
- Fixed thin pixel lines at some screen edges (dac3c31b9e78ab28545caf88cbd8105a8c62052e)
- Fixed many undefined behaviors and other minor bugs
- Modernized codebase by moving away from deprecated symbols

* Many small fixes to documentation.

CHANGES WITH 8:
* Several build-tools changes. Please adjust your build-scripts
accoringly:
Expand Down
47 changes: 47 additions & 0 deletions tools/extract_release_note.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2022 Aetf <[email protected]>
#
# SPDX-License-Identifier: MIT
import re
import inspect

PTN_RELEASE_NOTE = re.compile(r'^CHANGES WITH.+$([\s\S]+?)^CHANGES WITH.+$', re.MULTILINE)


def extract(src: str) -> str:
"""Find section between the first and the next 'CHANGES WITH xx:' lines,
and strip common prefix whitespace
"""
m = PTN_RELEASE_NOTE.search(src)
if m is not None:
return inspect.cleandoc(m.group(1)) + '\n'
else:
return ''


def main():
import argparse
import sys

parser = argparse.ArgumentParser()
parser.add_argument(
'src',
type=argparse.FileType('r'),
nargs='?',
help='input NEWS',
default=sys.stdin,
)
parser.add_argument(
'dest',
type=argparse.FileType('w'),
nargs='?',
help='output',
default=sys.stdout,
)
args = parser.parse_args()

args.dest.write(extract(args.src.read()))


if __name__ == '__main__':
main()

0 comments on commit 3292791

Please sign in to comment.