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

release script: default the major version to the current year, not the existing major version #648

Merged
merged 1 commit into from
Nov 27, 2024
Merged
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
6 changes: 4 additions & 2 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from __future__ import annotations

import argparse
import datetime as dt
import json
import re
import subprocess
Expand Down Expand Up @@ -83,8 +84,9 @@ def get_ruff_versions(
existing_ruff_vscode_version = Version(pyproject_toml["project"]["version"])

if new_ruff_vscode_version is None:
major, minor, _ = existing_ruff_vscode_version.release
new_ruff_vscode_version = Version(f"{major}.{minor + 2}.0")
major = dt.datetime.now(dt.timezone.utc).year
minor = existing_ruff_vscode_version.minor + 2
new_ruff_vscode_version = Version(f"{major}.{minor}.0")

dependencies = {
requirement.name: requirement.specifier
Expand Down