Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: single source of truth for version #57

Merged
merged 3 commits into from
Feb 16, 2023
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
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
cmake_minimum_required(VERSION 3.15...3.22)

file(READ ${CMAKE_CURRENT_LIST_DIR}/version.txt PACKAGE_VERSION)
string(STRIP ${PACKAGE_VERSION} PACKAGE_VERSION)

set(CMAKE_EXPORT_COMPILE_COMMANDS On)
project(vowpal_wabbit_next VERSION "0.0.1")
project(vowpal_wabbit_next VERSION "${PACKAGE_VERSION}")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
with open(pathlib.Path(__file__).parent.resolve() / "README.md", encoding="utf-8") as f:
long_description = f.read()

with open(pathlib.Path(__file__).parent.resolve() / "version.txt", "r", encoding="utf-8") as version_file:
version = version_file.read().strip()


setup(
name="vowpal-wabbit-next",
version="0.1.1",
version=version,
description="Experimental python bindings for VowpalWabbit",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion src/vowpal_wabbit_next/_core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,6 @@ def _write_cache_example(workspace: Workspace, example: Example, file: object) -
pass
def _write_cache_header(workspace: Workspace, file: object) -> None:
pass
__version__ = '0.0.1'
__version__ = '0.1.1'
_vw_commit = '8a6c027'
_vw_version = '9.7.0'
5 changes: 0 additions & 5 deletions tests/test_basic.py

This file was deleted.

1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.1