mirror of
https://github.com/drone-plugins/drone-hugo.git
synced 2026-06-04 18:24:11 +08:00
add cacheDir flag (#11)
golang version of #7 ----- This enables setting a custom cache directory for Hugo. Some caching plugins (e.g. http://plugins.drone.io/drillster/drone-volume-cache/) require the directories to be cached to be located inside the workspace.
This commit is contained in:
@@ -18,6 +18,7 @@ type (
|
||||
BuildDrafts bool
|
||||
BuildExpired bool
|
||||
BuildFuture bool
|
||||
CacheDir string
|
||||
Config string
|
||||
Content string
|
||||
Layout string
|
||||
@@ -75,6 +76,9 @@ func commandBuild(config Config) *exec.Cmd {
|
||||
args = append(args, "-F")
|
||||
}
|
||||
// add string args
|
||||
if config.CacheDir != "" {
|
||||
args = append(args, "--cacheDir", config.CacheDir)
|
||||
}
|
||||
if config.Config != "" {
|
||||
args = append(args, "--config", config.Config)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user