Skip to content

Commit

Permalink
zip on github works different than my local zip -- resorted to guessi…
Browse files Browse the repository at this point in the history
…ng the correct format
  • Loading branch information
jspaaks committed Feb 1, 2024
1 parent 751f0f3 commit b4bd2bf
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 @@ -102,7 +102,7 @@ const main = () => __awaiter(void 0, void 0, void 0, function* () {
yield zenodraft.file_add(token, sandbox, version_id, archive_name, verbose);
}
else if (compression === 'zip') {
yield exec_1.exec('zip', ['-x', '".git/*"', '-r', '-v', archive_name, '.']);
yield exec_1.exec('zip', ['-r', '-v', archive_name, '.', '-x', '/.git/*']);
yield zenodraft.file_add(token, sandbox, version_id, archive_name, verbose);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const main = async (): Promise<void> => {
await exec('tar', ['--exclude-vcs', '--exclude=\'.\'', '--exclude=\'..\'', `--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', ['-x', '".git/*"', '-r', '-v', archive_name, '.'])
await exec('zip', ['-r', '-v', archive_name, '.', '-x', '/.git/*'])
await zenodraft.file_add(token, sandbox, version_id, archive_name, verbose)
} else {
throw new Error('Unknown compression method.')
Expand Down

0 comments on commit b4bd2bf

Please sign in to comment.