diff options
author | HampusM <hampus@hampusmat.com> | 2021-08-12 15:37:30 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-08-12 15:37:30 +0200 |
commit | d41b27f43335cfb1a8ff49aeb121f992332429cf (patch) | |
tree | 93b6e1ec9b292c3d80ee1a538d0e729612148052 /test/setup.ts | |
parent | 30f0b2ee1f494be1786280040fb47ec18bde8a6d (diff) |
Cleaned up the settings implementation & renamed base_dir project-wide to git_dir
Diffstat (limited to 'test/setup.ts')
-rw-r--r-- | test/setup.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/setup.ts b/test/setup.ts index d446296..764c07a 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -8,17 +8,17 @@ config({ path: "test/test.env" }); const env = process.env as EnvironmentVariables; export default async function(): Promise<void> { - const can_access = await access(env.BASE_DIR) + const can_access = await access(env.GIT_DIR) .then(() => true) .catch(() => false); if(can_access) { - await remove(env.BASE_DIR); + await remove(env.GIT_DIR); } - await mkdir(env.BASE_DIR); + await mkdir(env.GIT_DIR); - const repository = await Clone.clone(env.AVAIL_REPO_URL, `${env.BASE_DIR}/${env.AVAIL_REPO}`, { bare: 1 }); + const repository = await Clone.clone(env.AVAIL_REPO_URL, `${env.GIT_DIR}/${env.AVAIL_REPO}`, { bare: 1 }); const config = await repository.config(); await config.setString("user.name", "BobDylan"); @@ -27,5 +27,5 @@ export default async function(): Promise<void> { await repository.fetchAll(); await repository.createTag((await repository.getMasterCommit()).id(), "1.2", "Fixed stuff"); - await writeFile(`${env.BASE_DIR}/${env.AVAIL_REPO}/owner`, "Bob"); + await writeFile(`${env.GIT_DIR}/${env.AVAIL_REPO}/owner`, "Bob"); }
\ No newline at end of file |