mirror of
https://github.com/appleboy/drone-scp.git
synced 2026-06-14 05:12:37 +08:00
build: compress build artifacts using gzip (#168)
- Change the compression format from `tar` to `tar.gz` - Replace the flag `-cf` with `-zcf` in the `buildArgs` function fix https://github.com/appleboy/drone-scp/issues/123
This commit is contained in:
+2
-2
@@ -579,7 +579,7 @@ func TestBuildArgs(t *testing.T) {
|
||||
}
|
||||
|
||||
result := buildArgs("test.tar.gz", list)
|
||||
expects := []string{"--exclude", "tests/a.txt", "--exclude", "tests/b.txt", "-cf", "test.tar.gz", "tests/a.txt", "tests/b.txt", "tests/c.txt"}
|
||||
expects := []string{"--exclude", "tests/a.txt", "--exclude", "tests/b.txt", "-zcf", "test.tar.gz", "tests/a.txt", "tests/b.txt", "tests/c.txt"}
|
||||
assert.Equal(t, expects, result)
|
||||
|
||||
list = fileList{
|
||||
@@ -587,7 +587,7 @@ func TestBuildArgs(t *testing.T) {
|
||||
}
|
||||
|
||||
result = buildArgs("test.tar.gz", list)
|
||||
expects = []string{"-cf", "test.tar.gz", "tests/a.txt", "tests/b.txt"}
|
||||
expects = []string{"-zcf", "test.tar.gz", "tests/a.txt", "tests/b.txt"}
|
||||
assert.Equal(t, expects, result)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user