diff --git a/encrypt.py b/encrypt.py index 2e6762e..b2317c7 100644 --- a/encrypt.py +++ b/encrypt.py @@ -8,6 +8,7 @@ from git import Repo import os from shutil import copytree +from pathlib import Path from glob import glob import subprocess from time import time @@ -30,7 +31,9 @@ enc_repo_pass = os.environ.get("ENCRYPTED_REPO_PASSWORD") enc_key = os.environ.get("ENCRYPTION_KEY") # Create our encrypted directory base -base_dir = os.getcwd() +cwd = os.getcwd() +path = Path(cwd) +base_dir = str(path.parent.absolute()) current_time = str(int(time())) os.mkdir(enc_path) os.chdir(enc_path) diff --git a/trigger.py b/trigger.py index 61b2404..6966ad9 100644 --- a/trigger.py +++ b/trigger.py @@ -19,8 +19,11 @@ content_repo_id = os.environ.get("CONTENT_REPO_ID") gitlab_token = os.environ.get("GITLAB_TOKEN") # Get the time and create a tag of epoch +cwd = os.getcwd() +path = Path(cwd) +base_dir = str(path.parent.absolute()) current_time = str(int(time())) -repo = Repo(os.getcwd()) +repo = Repo(base_dir) repo.create_tag(current_time) # Nuke the remote if it existed