File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -449,19 +449,19 @@ steps:
449449 wait: true
450450` ` `
451451
452- # ## `download_folder ` (optional)
452+ # ## `binary_folder ` (optional)
453453
454454Default : ` BUILDKITE_PLUGINS_PATH`
455455
456- This is the filesystem folder where the Go binary will be download to .
456+ This is the filesystem folder where the Go binary will be kept .
457457
458458# # Example
459459` ` ` yaml
460460steps:
461461 - label: "Triggering pipelines"
462462 plugins:
463463 - monorepo-diff#v1.8.0:
464- download_folder : "/var/buildkite-agent"
464+ binary_folder : "/var/buildkite-agent"
465465 watch:
466466 - path: "bar-service/"
467467 config:
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ err() {
1717 exit 1
1818}
1919
20- executable_dir=" ${BUILDKITE_PLUGIN_MONOREPO_DIFF_DOWNLOAD_FOLDER :- ${BUILDKITE_PLUGINS_PATH} } "
20+ executable_dir=" ${BUILDKITE_PLUGIN_MONOREPO_DIFF_BINARY_FOLDER :- ${BUILDKITE_PLUGINS_PATH} } "
2121
2222# Default to current directory if not set
2323if [[ -z " ${executable_dir} " || ${BUILDKITE_PLUGIN_MONOREPO_DIFF_BUILDKITE_PLUGIN_TEST_MODE:- false} == " true" ]]; then
@@ -34,7 +34,7 @@ if [[ ! -w "${executable_dir}" ]]; then
3434 err " Directory not writable: ${executable_dir} "
3535fi
3636
37- executable=" ${executable_dir} /monorepo-diff-buildkite-plugin"
37+ executable=" ${executable_dir%/ } /monorepo-diff-buildkite-plugin"
3838executable_version_file=" ${executable} .version"
3939
4040check_cmd () {
@@ -202,10 +202,13 @@ download_binary_and_run() {
202202}
203203
204204run_preinstalled_binary () {
205- local _executable=" monorepo-diff-buildkite-plugin "
205+ local _executable=" ${executable} "
206206
207- if ! check_cmd " $_executable " ; then
208- err " Binary '$_executable ' not found in PATH. Please install it or set download: true"
207+ if ! check_cmd " ${_executable} " ; then
208+ _executable=" $( basename " ${executable} " ) "
209+ if ! check_cmd " ${_executable} " ; then
210+ err " Binary '$_executable ' not found in PATH or binary_folder option. Please install it or set download: true"
211+ fi
209212 fi
210213
211214 ${_executable} " $@ "
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ configuration:
1515 type : boolean
1616 env :
1717 type : array
18- download_folder :
18+ binary_folder :
1919 type : string
2020 notify :
2121 type : [array]
You can’t perform that action at this time.
0 commit comments