Skip to content

Commit

Permalink
Changed to just bump the version with no check
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrewster committed Jul 9, 2024
1 parent 70feaad commit f2753a3
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions scripts/scripts/version_makefile.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import argparse
import json
import os
from typing import Literal

from git import Repo
from pydantic import validate_call
from typing import Literal

from scripts.version_poetry_project import changed_since_commit, rev_version
from scripts.version_poetry_project import rev_version


@validate_call
Expand All @@ -16,16 +14,11 @@ def update_path_deps(version: Literal['major', 'minor', 'patch']):
os.chdir(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
with open(os.path.join(loc, 'env.json')) as f:
data = json.load(f)

if changed_since_commit(data.setdefault('eidolon', {}).get('last-update-hash'), loc):
data['eidolon']['last-update-hash'] = Repo(".").head.commit.hexsha
updated_version = rev_version(data['version'], version)
data['version'] = updated_version
with open(os.path.join(loc, 'env.json'), 'w') as f:
json.dump(data, f, indent=2)
print(f"Updated version to {updated_version}")
else:
print("No changes detected")


def main():
Expand Down

0 comments on commit f2753a3

Please sign in to comment.