Install `nginx-build` when finding a newer version.

This commit is contained in:
Kazuhiro MUSASHI 2019-11-08 00:27:53 +08:00
parent dc6b5a2f01
commit 40e7c26656
1 changed files with 10 additions and 5 deletions

View File

@ -50,12 +50,17 @@ rescue
raise 'Cannot connect to http://github.com.'
end
# Download `nginx-build`:
execute "wget #{nginxbuild} -O #{TARBALL}"
execute "tar xf #{TARBALL} && chown webadm:webadm #{NGINXBUILD}" do
user USER
cwd WORKDIR
# バージョン確認して、アップデート必要かどうか確認
result = run_command("/home/webadm/nginx-build/nginx-build --version | grep #{tag_version}", error: false)
if result.exit_status != 0
# Download `nginx-build`:
execute "wget #{nginxbuild} -O #{TARBALL}"
execute "tar xf #{TARBALL} && chown webadm:webadm #{NGINXBUILD}" do
user USER
cwd WORKDIR
end
end
# Deploy `configure.sh`: