Skip to content
Open
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: 4 additions & 3 deletions docs/3.3.12. stacks version.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
```
Usage: stacks version

Print the Stacks and Python version numbers
Print the Stacks, Python, and Terraform version numbers
```

## Description

Print the Stacks and Python version numbers and exit
Print the Stacks, Python, and Terraform version numbers and exit

## Example

```shell
$ stacks version
Stacks 2.0.8
Stacks 2.0.12
Python 3.12.8
Terraform 1.9.8
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "stacks"
version = "2.0.11"
version = "2.0.12"
description = "Stacks, the Terraform code pre-processor"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 2 additions & 0 deletions src/stacks/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def cli():
def version():
print(f"Stacks {importlib.metadata.version('stacks')}")
print(f"Python {platform.python_version()}")
terraform_output = helpers.run_command(cmd.config.TERRAFORM_PATH, "version", interactive=False)
print(f"Terraform {terraform_output.stdout.split('\n')[0].split(' ')[1][1:]}")


@cli.command(hidden=True) # hidden because it should not be used independently unless for advanced debugging purposes
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.