diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..1dc0658 Binary files /dev/null and b/.DS_Store differ diff --git a/Formula/appveyor-build-agent.rb b/Formula/appveyor-build-agent.rb index 628893b..f86e67f 100644 --- a/Formula/appveyor-build-agent.rb +++ b/Formula/appveyor-build-agent.rb @@ -28,41 +28,16 @@ def caveats end - plist_options :startup => true - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - Program - #{prefix}/appveyor-build-agent - ProgramArguments - - - EnvironmentVariables - - PATH - /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin - - RunAtLoad - - WorkingDirectory - #{prefix} - StandardErrorPath - #{prefix}/build-agent.stderr.log - StandardOutPath - #{prefix}/build-agent.stdout.log - - - EOS + service do + run "#{opt_prefix}/appveyor-build-agent" + keep_alive successful_exit: true + environment_variables PATH: "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" + working_dir "#{var}/appveyor/build-agent/" + log_path "#{var}/build-agent.stdout.log" + error_log_path "#{var}/build-agent.stderr.log" + run_at_load true end - + test do # `test do` will create, run in and delete a temporary directory. # diff --git a/Formula/appveyor-host-agent.rb b/Formula/appveyor-host-agent.rb index 998da68..6fadd55 100644 --- a/Formula/appveyor-host-agent.rb +++ b/Formula/appveyor-host-agent.rb @@ -50,34 +50,13 @@ def caveats end - plist_options :startup => false - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - Program - #{prefix}/appveyor-host-agent - ProgramArguments - - - RunAtLoad - - WorkingDirectory - #{var}/appveyor/host-agent/ - StandardErrorPath - #{var}/appveyor/host-agent/host-agent.stderr.log - StandardOutPath - #{var}/appveyor/host-agent/host-agent.stdout.log - - - EOS + service do + run "#{opt_prefix}/appveyor-host-agent" + keep_alive successful_exit: true + log_path "#{var}/appveyor/host-agent/host-agent.stdout.log" + error_log_path "#{var}/appveyor/host-agent/host-agent.stderr.log" + working_dir "#{var}/appveyor/host-agent/" + run_at_load false end test do