mirror of
https://github.com/trympet/nextcloud-artifacts-action.git
synced 2025-04-24 20:16:08 +02:00
test
This commit is contained in:
parent
5b01b7a17b
commit
d873964202
1439
dist/index.js
vendored
1439
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@ -140,13 +140,15 @@ export class NextcloudClient {
|
||||
|
||||
private async zip(dirpath: string, destpath: string) {
|
||||
const archive = archiver.create('zip', { zlib: { level: 9 } });
|
||||
const stream = fsSync.createWriteStream(destpath);
|
||||
archive.directory(dirpath, false)
|
||||
.on('error', e => Promise.reject())
|
||||
.on('close', () => Promise.resolve())
|
||||
.pipe(stream);
|
||||
const stream = archive.directory(dirpath, false)
|
||||
.pipe(fsSync.createWriteStream(destpath));
|
||||
|
||||
return archive.finalize();
|
||||
await archive.finalize();
|
||||
|
||||
return await new Promise<void>((resolve, reject) => {
|
||||
stream.on('error', e => reject(e))
|
||||
.on('finish', () => resolve());
|
||||
})
|
||||
}
|
||||
|
||||
private async upload(file: string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user