Skip to content
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
2 changes: 1 addition & 1 deletion scripts/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
tests/test_action_version.py fails if the two consumers ever disagree again.
"""

ACTION_VERSION = "v1.0.3"
ACTION_VERSION = "v1.0.4"
5 changes: 4 additions & 1 deletion scripts/write_firstrun_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
import sys
from pathlib import Path

ACTION_VERSION = "v1.0.0-rc1"
try:
from _version import ACTION_VERSION
except ImportError: # invoked as a module rather than a script
from scripts._version import ACTION_VERSION


def _find_file(root: Path, name: str) -> Path | None:
Expand Down
7 changes: 4 additions & 3 deletions tests/test_action_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def test_both_report_writers_agree() -> None:

assert load("compare_runs").ACTION_VERSION == expected
assert load("detect_test_set_drift").ACTION_VERSION == expected
assert load("write_firstrun_report").ACTION_VERSION == expected


def test_version_matches_the_newest_release_tag() -> None:
Expand Down Expand Up @@ -70,6 +71,6 @@ def test_version_matches_the_newest_release_tag() -> None:

def test_the_stamp_actually_reaches_a_gate_report() -> None:
"""A constant nothing writes out would pass every check above and still be useless."""
source = (ROOT / "scripts" / "compare_runs.py").read_text(encoding="utf-8")

assert '"action_version": ACTION_VERSION' in source
for name in ("compare_runs", "write_firstrun_report"):
source = (ROOT / "scripts" / f"{name}.py").read_text(encoding="utf-8")
assert '"action_version": ACTION_VERSION' in source, name
Loading