@@ -2,6 +2,7 @@ package main
22
33import (
44 "os"
5+ "runtime"
56
67 "github.com/joho/godotenv"
78 "github.com/sirupsen/logrus"
@@ -267,26 +268,26 @@ func run(c *cli.Context) error {
267268 Config : c .String ("docker.config" ),
268269 },
269270 Build : docker.Build {
270- Remote : c .String ("remote.url" ),
271- Name : c .String ("commit.sha" ),
272- Dockerfile : c .String ("dockerfile" ),
273- Context : c .String ("context" ),
274- Tags : c .StringSlice ("tags" ),
275- Args : c .StringSlice ("args" ),
276- ArgsEnv : c .StringSlice ("args-from-env" ),
277- Target : c .String ("target" ),
278- Squash : c .Bool ("squash" ),
279- Pull : c .BoolT ("pull-image" ),
280- CacheFrom : c .StringSlice ("cache-from" ),
281- Compress : c .Bool ("compress" ),
282- Repo : c .String ("repo" ),
283- Labels : c .StringSlice ("custom-labels" ),
284- LabelSchema : c .StringSlice ("label-schema" ),
285- AutoLabel : c .BoolT ("auto-label" ),
286- Link : c .String ("link" ),
287- NoCache : c .Bool ("no-cache" ),
288- AddHost : c .StringSlice ("add-host" ),
289- Quiet : c .Bool ("quiet" ),
271+ Remote : c .String ("remote.url" ),
272+ Name : c .String ("commit.sha" ),
273+ Dockerfile : c .String ("dockerfile" ),
274+ Context : c .String ("context" ),
275+ Tags : c .StringSlice ("tags" ),
276+ Args : c .StringSlice ("args" ),
277+ ArgsEnv : c .StringSlice ("args-from-env" ),
278+ Target : c .String ("target" ),
279+ Squash : c .Bool ("squash" ),
280+ Pull : c .BoolT ("pull-image" ),
281+ CacheFrom : c .StringSlice ("cache-from" ),
282+ Compress : c .Bool ("compress" ),
283+ Repo : c .String ("repo" ),
284+ Labels : c .StringSlice ("custom-labels" ),
285+ LabelSchema : c .StringSlice ("label-schema" ),
286+ AutoLabel : c .BoolT ("auto-label" ),
287+ Link : c .String ("link" ),
288+ NoCache : c .Bool ("no-cache" ),
289+ AddHost : c .StringSlice ("add-host" ),
290+ Quiet : c .Bool ("quiet" ),
290291 },
291292 Daemon : docker.Daemon {
292293 Registry : c .String ("docker.registry" ),
@@ -327,3 +328,11 @@ func run(c *cli.Context) error {
327328
328329 return plugin .Exec ()
329330}
331+
332+ func GetExecCmd () string {
333+ if runtime .GOOS == "windows" {
334+ return "C:/bin/drone-docker.exe"
335+ }
336+
337+ return "drone-docker"
338+ }
0 commit comments