diff --git a/Makefile b/Makefile index f0b52b2..412bf7c 100644 --- a/Makefile +++ b/Makefile @@ -76,6 +76,12 @@ pre-commit-run: @echo "===============================================================================" pre-commit run --all-files +release: + @echo "===============================================================================" + @echo "Forcing a new semantic release on GitHub by creating an empty commit and pushing to the repository ..." + @echo "===============================================================================" + git commit -m "fix: force a new release" --allow-empty && git push + # --------------------------------------------------------- # Python # --------------------------------------------------------- @@ -164,6 +170,7 @@ help: @echo 'tear-down - Destroy all Docker build and local artifacts' @echo 'pre-commit-init - Install and configure pre-commit hooks' @echo 'pre-commit-run - Run pre-commit hooks on all files' + @echo 'release - Force a new semantic release on GitHub by creating an empty commit and pushing to the repository' @echo '<************************** Python **************************>' @echo 'check-python - Verify Python 3.13 is installed' @echo 'python-init - Create a Python virtual environment and install dependencies' diff --git a/changelogs/CHANGELOG.md b/changelogs/CHANGELOG.md new file mode 100644 index 0000000..cad4e97 --- /dev/null +++ b/changelogs/CHANGELOG.md @@ -0,0 +1,26 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). + + + +## [0.1.0-alpha.2](https://github.com/FullStackWithLawrence/netflix-writers/compare/v0.1.0-alpha.1...v0.1.0-alpha.2) (2026-06-16) + +### Bug Fixes + +* force a new release ([9f89968](https://github.com/FullStackWithLawrence/netflix-writers/commit/9f899686a65e044349f00c058650831af9e11681)) + +## [0.1.0-alpha.1](https://github.com/FullStackWithLawrence/netflix-writers/compare/v0.0.1...v0.1.0-alpha.1) (2026-06-16) + +### Features + +* add tmdb, imdb performance attributes to results ([869a4cc](https://github.com/FullStackWithLawrence/netflix-writers/commit/869a4cc4a73c5ea9d947da2b17c595b644124a4f)) +* code matching algorithm for Netflix, IMDb and TMDB ([392dd09](https://github.com/FullStackWithLawrence/netflix-writers/commit/392dd09c4acd67ea618950cef12742de3a8326ea)) +* package the import programs ([91ba8a0](https://github.com/FullStackWithLawrence/netflix-writers/commit/91ba8a079b4ee3ebe9942f9873ab8a135c659f9b)) +* work on unified dataset ([a0124da](https://github.com/FullStackWithLawrence/netflix-writers/commit/a0124da1b844fad7d85c05bf15d7a9fc91333ab1)) + +### Refactoring + +* version bump logic ([67ec122](https://github.com/FullStackWithLawrence/netflix-writers/commit/67ec122c418d2d22ea539ab890172b8f947c3dfa)) diff --git a/netflix/__version__.py b/netflix/__version__.py index 5186c08..0f551d3 100644 --- a/netflix/__version__.py +++ b/netflix/__version__.py @@ -1,5 +1,5 @@ # DO NOT EDIT. # Managed via automated CI/CD in .github/workflows/semanticVersionBump.yml. -__version__ = "0.0.1" +__version__ = "0.1.0-alpha.2" __all__ = ["__version__"] diff --git a/pyproject.toml b/pyproject.toml index 3d2df11..93657c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "netflix-writers" -version = "0.0.1" +version = "0.1.0-alpha.2" requires-python = ">=3.12" description = "Netflix Writers: An AI-powered storytelling assistant for content creators." authors = [{ name = "Lawrence McDaniel", email = "lpm0073@gmail.com" }] diff --git a/scripts/bump_version.py b/scripts/bump_version.py index e755672..1735780 100644 --- a/scripts/bump_version.py +++ b/scripts/bump_version.py @@ -19,46 +19,16 @@ - pyproject.toml """ +import os import re import sys from pathlib import Path -PLACEHOLDER = "9999.9999.9999.dev9999" - # semantic version: ##.##.## or ##.##.##-label.n SEMANTIC_VERSION_REGEX = r"^\d+\.\d+\.\d+(-[A-Za-z0-9.]+)?$" - - -def update_version_in_file(filepath, replacement): - """ - Update the version in a file by replacing the placeholder with the new. - - version. - - .. args: - filepath (str): The path to the file to update. - replacement (str): The new version string to replace the placeholder. - - .. returns: - None - - .. raises: - ValueError: If the placeholder is not found in the file. - """ - - path = Path(filepath) - text = path.read_text(encoding="utf-8") - count = text.count(PLACEHOLDER) - - if count == 0: - raise ValueError(f"Placeholder '{PLACEHOLDER}' not found in {filepath}") - - path.write_text( - text.replace(PLACEHOLDER, replacement), - encoding="utf-8", - ) - - print(f"Updated {filepath}: {count} replacements") +HERE = os.path.abspath(os.path.dirname(__file__)) +NETFLIX_DIR = os.path.join(HERE, "..", "netflix") +REPO_ROOT = os.path.join(HERE, "..") def main(): @@ -79,8 +49,8 @@ def main(): ValueError: If the new version format is invalid or if the placeholder is not found in any of the files. """ - cicd: bool = False - usage: str = "Usage: python bump_version.py [--cicd]" + cicd = False + usage = "Usage: python bump_version.py [--cicd]" if len(sys.argv) not in (2, 3): print(usage) sys.exit(1) @@ -96,12 +66,25 @@ def main(): sys.exit(1) cicd = True - update_version_in_file("netflix/__version__.py", new_version) - if cicd: - update_version_in_file( - "pyproject.toml", - new_version, - ) + # version file + path = Path(os.path.join(NETFLIX_DIR, "__version__.py")) + text = path.read_text(encoding="utf-8") + text = re.sub( + r'__version__\s*=\s*"[^"]+"', + f'__version__ = "{new_version}"', + text, + ) + path.write_text(text, encoding="utf-8") + + # pyproject.toml + path = Path(os.path.join(REPO_ROOT, "pyproject.toml")) + text = path.read_text(encoding="utf-8") + text = re.sub( + r'version\s*=\s*"[^"]+"', + f'version = "{new_version}"', + text, + ) + path.write_text(text, encoding="utf-8") if __name__ == "__main__":