From cc504033a88ef8efd1875d074941059bc4053569 Mon Sep 17 00:00:00 2001 From: "Jurriaan H. Spaaks" Date: Thu, 1 Feb 2024 12:43:35 +0100 Subject: [PATCH] updated tar command --- lib/index.js | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 149eac4..ebbbf43 100644 --- a/lib/index.js +++ b/lib/index.js @@ -98,7 +98,7 @@ const main = () => __awaiter(void 0, void 0, void 0, function* () { const archive_name = `${payload.contents.repository.name}.${compression}`; if (compression === 'tar.gz') { yield exec_1.exec('touch', [archive_name]); - yield exec_1.exec('tar', ['--exclude-vcs', '--exclude=\'.\'', '--exclude=\'..\'', `--exclude=${archive_name}`, '-zcvf', archive_name, `ls -1a`]); + yield exec_1.exec('tar', ['--exclude=\'.\'', '--exclude=\'..\'', '--exclude=\'.git\'', `--exclude=${archive_name}`, '-zcvf', archive_name, `ls -1a`]); yield zenodraft.file_add(token, sandbox, version_id, archive_name, verbose); } else if (compression === 'zip') { diff --git a/src/index.ts b/src/index.ts index 30fef99..041eda6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -87,7 +87,7 @@ export const main = async (): Promise => { const archive_name = `${payload.contents.repository.name}.${compression}` if (compression === 'tar.gz') { await exec('touch', [archive_name]) - await exec('tar', ['--exclude-vcs', '--exclude=\'.\'', '--exclude=\'..\'', `--exclude=${archive_name}`, '-zcvf', archive_name, `ls -1a`]) + await exec('tar', ['--exclude=\'.\'', '--exclude=\'..\'', '--exclude=\'.git\'', `--exclude=${archive_name}`, '-zcvf', archive_name, `ls -1a`]) await zenodraft.file_add(token, sandbox, version_id, archive_name, verbose) } else if (compression === 'zip') { await exec('zip', ['-r', '-v', archive_name, '.', '-x', '/.git/*'])