test
This commit is contained in:
@@ -12,9 +12,21 @@ import hashlib
|
||||
import json
|
||||
import datetime
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - Thread %(threadName)s - %(message)s')
|
||||
|
||||
# Update the local repository via git pull before proceeding
|
||||
try:
|
||||
subprocess.run(['git', 'pull'], check=True, capture_output=True)
|
||||
logging.info("Updated repo via git pull")
|
||||
except subprocess.CalledProcessError as e:
|
||||
logging.warning(f"Git pull failed (non-zero exit): {e}")
|
||||
except FileNotFoundError:
|
||||
logging.warning("Git not found; skipping pull")
|
||||
except Exception as e:
|
||||
logging.warning(f"Unexpected error during git pull: {e}")
|
||||
|
||||
api_base = "https://nachos386.lcube-server.de/api/v1"
|
||||
|
||||
def fetch_release_info(repo_owner, repo_name):
|
||||
@@ -41,7 +53,6 @@ def fetch_release_info(repo_owner, repo_name):
|
||||
hash_value = None
|
||||
# For compatibility, check if 'digest' exists (unlikely in Gitea)
|
||||
digest = asset.get('digest', '')
|
||||
print(asset)
|
||||
if digest and digest.startswith('sha256:'):
|
||||
hash_value = digest[7:].lower()
|
||||
logging.info(f"Fetched hash for {filename}: {hash_value[:16]}...")
|
||||
|
||||
Reference in New Issue
Block a user