From 9ad01e4fd30025e8858650d38e95cfe9193a3222 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Thu, 6 Aug 2020 00:17:23 +0900 Subject: [PATCH] Use posix archive format (#533) * Use posix archive format Signed-off-by: Sora Morimoto * Update package.json and RELEASES.md Signed-off-by: Sora Morimoto --- packages/cache/RELEASES.md | 5 ++++- packages/cache/__tests__/tar.test.ts | 2 ++ packages/cache/package-lock.json | 2 +- packages/cache/package.json | 2 +- packages/cache/src/internal/tar.ts | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/cache/RELEASES.md b/packages/cache/RELEASES.md index dce5009b..51369194 100644 --- a/packages/cache/RELEASES.md +++ b/packages/cache/RELEASES.md @@ -17,4 +17,7 @@ - `retry`, `retryTypedResponse`, and `retryHttpClientResponse` moved from `cacheHttpClient` to `requestUtils` ### 1.0.1 -- Fix bug in downloading large files (> 2 GBs) with the Azure SDK \ No newline at end of file +- Fix bug in downloading large files (> 2 GBs) with the Azure SDK + +### 1.0.2 +- Use posix archive format to add support for some tools diff --git a/packages/cache/__tests__/tar.test.ts b/packages/cache/__tests__/tar.test.ts index ecb6799b..b891d85b 100644 --- a/packages/cache/__tests__/tar.test.ts +++ b/packages/cache/__tests__/tar.test.ts @@ -135,6 +135,7 @@ test('zstd create tar', async () => { expect(execMock).toHaveBeenCalledWith( `"${tarPath}"`, [ + '--posix', '--use-compress-program', 'zstd -T0 --long=30', '-cf', @@ -170,6 +171,7 @@ test('gzip create tar', async () => { expect(execMock).toHaveBeenCalledWith( `"${tarPath}"`, [ + '--posix', '-z', '-cf', IS_WINDOWS ? CacheFilename.Gzip.replace(/\\/g, '/') : CacheFilename.Gzip, diff --git a/packages/cache/package-lock.json b/packages/cache/package-lock.json index 647bfc92..2755a274 100644 --- a/packages/cache/package-lock.json +++ b/packages/cache/package-lock.json @@ -1,6 +1,6 @@ { "name": "@actions/cache", - "version": "1.0.0", + "version": "1.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/cache/package.json b/packages/cache/package.json index c41de866..52c8c3bb 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -1,6 +1,6 @@ { "name": "@actions/cache", - "version": "1.0.1", + "version": "1.0.2", "preview": true, "description": "Actions cache lib", "keywords": [ diff --git a/packages/cache/src/internal/tar.ts b/packages/cache/src/internal/tar.ts index 7f836b83..680433e7 100644 --- a/packages/cache/src/internal/tar.ts +++ b/packages/cache/src/internal/tar.ts @@ -101,6 +101,7 @@ export async function createTar( } } const args = [ + '--posix', ...getCompressionProgram(), '-cf', cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),