Skip to content

Commit

Permalink
#32 Project folder set as safe directory
Browse files Browse the repository at this point in the history
  • Loading branch information
hkir-dev committed Nov 30, 2023
1 parent 6560095 commit 7db3b55
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
17 changes: 17 additions & 0 deletions docs/Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ You can download TDT Docker image through following the steps defined in project
docker pull ghcr.io/brain-bican/taxonomy-development-tools:latest
```

## Update Taxonomy Development Tools to the latest version

You can update TDT Docker image to the latest version through:

Stop running TDT containers:
```
docker stop $(docker ps -a -q --filter ancestor=ghcr.io/brain-bican/taxonomy-development-tools:latest)
```

Remove the existing TDT image and pull the latest one:

```
docker rmi $(docker images 'ghcr.io/brain-bican/taxonomy-development-tools:latest' -a -q | uniq)
docker pull ghcr.io/brain-bican/taxonomy-development-tools:latest
```


# Install requirements

## Docker
Expand Down
6 changes: 5 additions & 1 deletion scripts/configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ def configure_git(root_folder):

runcmd("git config --global credential.helper store")

if os.getenv("GITHUB_AUTH_TOKEN", default=None):
remotes = runcmd("git remote -v")

if "origin" in remotes and os.getenv("GITHUB_AUTH_TOKEN", default=None):
runcmd("git remote set-url origin https://{gh_token}@github.com/{gh_org}/{gh_repo}.git/".format(gh_token=os.getenv("GITHUB_AUTH_TOKEN"), gh_org=github_org, gh_repo=repo))
else:
print("WARN: The project has not been pushed to GitHub yet, resulting in incomplete GitHub authentication.")


def retrieve_configs(root_folder_path, *properties):
Expand Down
2 changes: 2 additions & 0 deletions tdt/tdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ def seed(config, clean, outdir, title, user, verbose, repo, skipgit, gitname, gi
if gitemail is not None:
os.environ['GIT_AUTHOR_EMAIL'] = gitemail
os.environ['GIT_COMMITTER_EMAIL'] = gitemail
runcmd("git config --global init.defaultBranch master".format(dir=outdir))
runcmd("git config --global --add safe.directory '{dir}'".format(dir=outdir))
runcmd("cd {dir} && git init && git add {files}".
format(dir=outdir,
files=" ".join([t.replace(outdir, ".", 1) for t in tgts])))
Expand Down

0 comments on commit 7db3b55

Please sign in to comment.