Constructor and Description |
---|
ZipStep(ProjectFilesystem filesystem,
Path pathToZipFile,
Set<Path> paths,
boolean junkPaths,
ZipCompressionLevel compressionLevel,
Path baseDir)
Create a
ZipStep to create or update a zip archive. |
Modifier and Type | Method and Description |
---|---|
StepExecutionResult |
execute(ExecutionContext context) |
String |
getDescription(ExecutionContext context) |
String |
getShortName() |
public ZipStep(ProjectFilesystem filesystem, Path pathToZipFile, Set<Path> paths, boolean junkPaths, ZipCompressionLevel compressionLevel, Path baseDir)
ZipStep
to create or update a zip archive.
Note that paths added to the archive are always relative to the working directory.
For example, if you're in /dir
and you add file.txt
, you get an archive
containing just the file. If you were in /
and added dir/file.txt
, you would
get an archive containing the file within a directory.
filesystem
- project filesystem based in current working directory.pathToZipFile
- path to archive to create, relative to project root.paths
- a set of files to work on. The entire working directory is assumed if this set is
empty.junkPaths
- if true
, the relative paths of added archive entries are discarded,
i.e. they are all placed in the root of the archive.compressionLevel
- between 0 (store) and 9.baseDir
- working directory for zip
command.public StepExecutionResult execute(ExecutionContext context) throws IOException
execute
in interface Step
IOException
public String getDescription(ExecutionContext context)
getDescription
in interface Step
public String getShortName()
getShortName
in interface Step