Improve path detection
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
f9e2b2e53d
commit
7af098a4fd
2 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue