@groovy.transform.InheritConstructors @groovy.transform.CompileStatic abstract class AbstractSingleFileInstaller extends AbstractDistributionInstaller
Installer for single files. Works really well for single GO-based executables.
| Fields inherited from class | Fields |
|---|---|
class AbstractDistributionInstaller |
IS_MACOSX, IS_WINDOWS, configCacheSafeOperations, distributionName, execPatterns |
| Constructor and description |
|---|
AbstractSingleFileInstaller
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
Provider<File> |
getSingleFile(String version)Returns the path to the terraform executable.
|
|
protected abstract String |
getSingleFileName()Gets the name of the single file as it should be on local disk |
|
protected void |
unpack(File singleFile, File destDir)Changes the behaviour to not unpack, but simply mark file as executable if the file pattern matches. |
|
protected File |
verifyDistributionRoot(File distDir)Validates that the downloaded file is good. |
| Methods inherited from class | Name |
|---|---|
class AbstractDistributionInstaller |
addExecPattern, extractFinalExtension, getDistFromCache, getDistFromSdkMan, getDistributionFile, getDistributionRoot, getSdkManCandidateName, listDirs, resolveDistributionLocationForVersion, setChecksum, setDownloadRoot, setSdkManCandidateName, unpack, unpackParametersForExtension, verifyDistributionRoot, verifyDownloadChecksum |
Returns the path to the terraform executable.
Will force a download if not already downloaded.
terraform or null if not a supported operating system.Gets the name of the single file as it should be on local disk
Changes the behaviour to not unpack, but simply mark file as executable if the file pattern matches.
singleFile - Incoming filedestDir - Destination directory to copy to if different from the parent of the incoming file.