Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ COPY . /buildrunner-source
RUN \
cd /buildrunner-source && \
sed -i s/jaraco-classes/jaraco.classes/ requirements.txt && \
python3 scripts/write-version.py && \
pip install . && \
rm -rf /buildrunner-source

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ build-backend = "setuptools.build_meta"

[project]
name = "buildrunner"
version = "3.15"
description = "Docker-based build tool"
readme = "README.rst"
requires-python = ">=3.6"
Expand All @@ -14,7 +13,7 @@ authors = [
]
urls = { "Homepage" = "https://github.com/adobe/buildrunner" }

dynamic = ["dependencies", "optional-dependencies"]
dynamic = ["version", "dependencies", "optional-dependencies"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
Expand All @@ -33,4 +32,4 @@ buildrunner-cleanup = "buildrunner.cli:clean_cache"
]

[tool.setuptools.packages.find]
exclude = ["*.tests", "*.tests.*", "tests.*", "tests"]
exclude = ["*.tests", "*.tests.*", "tests.*", "tests"]
36 changes: 36 additions & 0 deletions scripts/write-version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""
Copyright 2025 Adobe
All Rights Reserved.

NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
with the terms of the Adobe license agreement accompanying it.
"""
import os
import subprocess


def main():
major = 3
minor = 15
try:
commit_count = (
subprocess.check_output(["git", "rev-list", "--count", "HEAD"])
.strip()
.decode("utf-8")
)
except Exception:
commit_count = "0"

version_file = os.path.join(
os.path.abspath(os.path.join(__file__, os.pardir, os.pardir)),
"buildrunner",
"version.py",
)

version = f"{major}.{minor}.{commit_count}"
with open(version_file, "w") as version_file:
version_file.write(f'__version__ = "{version}"\n')


if __name__ == "__main__":
main()
Loading