Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/cmake_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,9 @@ jobs:
installers/*/*.dmg

- name: Create Release
run: gh release create ${{ github.ref_name }} --prerelease installers/*/*.msi installers/*/*.zip installers/*/*.dmg
# a product that doesn't build on every platform has no installers of some kinds (Dialogue: no Linux zips)
run: |
shopt -s nullglob
tag="${{ github.ref_name }}"
python3 scripts/release_notes.py "${tag%-v*}" "${tag##*-v}" > notes.md
gh release create "$tag" --prerelease --notes-file notes.md installers/*/*.msi installers/*/*.zip installers/*/*.dmg
9 changes: 9 additions & 0 deletions cmake/AltvanePlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ function(altvane_add_plugin target)
if (NOT ARG_AAX_CATEGORY)
set(ARG_AAX_CATEGORY AAX_ePlugInCategory_None)
endif ()
# checked here, on every platform, rather than only where LV2 is built (patch_lv2.py fails the build there)
file(STRINGS "${CMAKE_SOURCE_DIR}/packaging/patch_lv2.py" lv2_lines REGEX "^ '[a-z]+': 'lv2:")
list(TRANSFORM lv2_lines REPLACE "^ '([a-z]+)'.*" "\\1" OUTPUT_VARIABLE lv2_known)
foreach (tag IN LISTS ARG_LV2_TAGS)
string(TOLOWER "${tag}" tag_lower)
if (NOT tag_lower IN_LIST lv2_known)
message(FATAL_ERROR "altvane_add_plugin(${target}): '${tag}' is not an LV2 tag packaging/patch_lv2.py knows")
endif ()
endforeach ()

set(product_dir "${CMAKE_CURRENT_SOURCE_DIR}")

Expand Down
43 changes: 43 additions & 0 deletions scripts/release_notes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3
"""Print the release notes for one product's release: its CHANGELOG section and how to install an unsigned build.

scripts/release_notes.py <product> <version>

The section is the one headed `## <version>` in products/<product>/CHANGELOG.md. Its headings move up a level and its
hard-wrapped lines are joined, since GitHub keeps line breaks in release notes."""
import pathlib
import re
import sys

root = pathlib.Path(__file__).resolve().parent.parent
product, version = sys.argv[1], sys.argv[2]
changelog = (root / "products" / product / "CHANGELOG.md").read_text()
match = re.search(rf"^## {re.escape(version)}\n(.*?)(?=^## |\Z)", changelog, re.S | re.M)
if not match:
sys.exit(f"products/{product}/CHANGELOG.md has no '## {version}' section")
notes = match.group(1).strip()
notes = re.sub(r"^### ", "## ", notes, flags=re.M)
notes = re.sub(r"\n {2,}(?=\S)", " ", notes) # a list item's continuation lines
notes = re.sub(r"(?<=[^\n])\n(?=[^\n\-#*\s|])", " ", notes) # a paragraph's

platforms_file = root / "products" / product / "PLATFORMS"
platforms = None
if platforms_file.exists():
platforms = {line.strip() for line in platforms_file.read_text().splitlines()
if line.strip() and not line.startswith("#")}


def builds_on(system: str) -> bool:
return platforms is None or any(p.startswith(system) for p in platforms)


install = ["## Installing", "", "These builds are not signed yet.", ""]
if builds_on("Darwin"):
install.append("- **macOS:** if macOS says the installer can't be opened, open System Settings → Privacy & Security "
"and choose **Open Anyway**.")
if builds_on("Windows"):
install.append("- **Windows:** if SmartScreen stops the installer, choose **More info → Run anyway**.")
if builds_on("Linux"):
install.append("- **Linux:** unzip and copy the plug-ins into `~/.vst3` or `~/.lv2`.")
install += ["", "Pick the AVX2 build on x86-64 machines from about 2013 onwards; the plain x86-64 build runs everywhere."]
print(notes + "\n\n" + "\n".join(install))
Loading