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

Show kontrol version number with the kontrol version command #77

Merged
merged 10 commits into from
Oct 5, 2023
2 changes: 2 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
og_version=$(git show origin/${GITHUB_BASE_REF}:package/version)
./package/version.sh bump ${og_version}
./package/version.sh sub
new_version=$(cat package/version)
sed --in-place "s/^VERSION: Final = '.*'$/VERSION: Final = '${new_version}'/" src/kontrol/__init__.py
git add --update && git commit --message "Set Version: $(cat package/version)" || true
- name: 'Push updates'
run: git push origin HEAD:${GITHUB_HEAD_REF}
Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.17
0.1.18
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kontrol"
version = "0.1.17"
version = "0.1.18"
description = "Foundry integration for KEVM"
authors = [
"Runtime Verification, Inc. <contact@runtimeverification.com>",
Expand Down
8 changes: 8 additions & 0 deletions src/kontrol/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from __future__ import annotations

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from typing import Final

VERSION: Final = '0.1.18'
7 changes: 5 additions & 2 deletions src/kontrol/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from pyk.cli.utils import file_path
from pyk.proof.tui import APRProofViewer

from . import VERSION
from .cli import KontrolCLIArgs
from .foundry import (
Foundry,
Expand Down Expand Up @@ -72,7 +73,7 @@ def main() -> None:


def exec_version(**kwargs: Any) -> None:
raise NotImplementedError()
print(f'Kontrol Version: {VERSION}')
spencerhaoxiao marked this conversation as resolved.
Show resolved Hide resolved


def exec_compile(contract_file: Path, **kwargs: Any) -> None:
Expand Down Expand Up @@ -419,7 +420,9 @@ def parse(s: str) -> list[T]:

command_parser = parser.add_subparsers(dest='command', required=True)

command_parser.add_parser('version', help='Print out version of Kontrol command.')
command_parser.add_parser(
'version', help='Print out version of Kontrol command.', parents=[kontrol_cli_args.logging_args]
spencerhaoxiao marked this conversation as resolved.
Show resolved Hide resolved
)

solc_args = command_parser.add_parser('compile', help='Generate combined JSON with solc compilation results.')
solc_args.add_argument('contract_file', type=file_path, help='Path to contract file.')
Expand Down
Loading