Skip to content

Commit

Permalink
Resolve git lock file persistance
Browse files Browse the repository at this point in the history
  • Loading branch information
thorrak committed Jul 4, 2023
1 parent 5585534 commit a5c659f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/git_integration.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from git import Repo
import fermentrack_django.settings as settings
from constance import config # For the explicitly user-configurable stuff
Expand All @@ -24,6 +26,13 @@ def app_is_current(tagged_commits_only=False, branch_to_check=None):


def get_local_remote_commit_info():
file_path = "/app/.git/refs/remotes/origin/dev.lock"

# Check if the file exists
if os.path.exists(file_path):
# Delete the file
os.remove(file_path)

local_repo = Repo(path=settings.ROOT_DIR)
remote_repo = local_repo.remote()

Expand Down

0 comments on commit a5c659f

Please sign in to comment.