Skip to content

Commit

Permalink
updated tar command
Browse files Browse the repository at this point in the history
  • Loading branch information
jspaaks committed Feb 1, 2024
1 parent b4bd2bf commit cc50403
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const main = async (): Promise<void> => {
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/*'])
Expand Down

0 comments on commit cc50403

Please sign in to comment.