Elixir 部署系列git
Erlang/Elixir: 用Distillery替換Exam打包器
Erlang/Elixir: Edeliver 持續部署 Checklist
Erlang/Elixir: 使用 Edeliver 進行持續部署segmentfault
本文是基於 Erlang/Elixir: 使用 Edeliver 進行持續部署 文章通過一週的試錯, 總結出來的工做流.app
1. 假定當前版本爲
0.1.16
, 須要升級到0.1.17
, 須要在mix.exs
文件中提高版本號ui
diff --git a/mix.exs b/mix.exs index 88a39dc..c338b63 100755 --- a/mix.exs +++ b/mix.exs @@ -5,7 +5,7 @@ defmodule TestApp.Mixfile do [ app: :test_app, description: "A test app", - version: "0.1.16", + version: "0.1.17", elixir: "~> 1.2", build_embedded: Mix.env in [:prod], start_permanent: Mix.env == :prod,
2. Git/Gitflow版本發佈code
git add . git commit -m 'bump version to 0.1.17' git push git flow release start 0.1.17 git flow release publish 0.1.17 git flow release finish -m 'Release 0.1.17' 0.1.17 git push git push --tags
3. 一行命令發佈新版本(替換)ip
mix deps.update --all mix edeliver update production --branch=master --start-deploy --verbose --to=0.1.17
4. 一行命令發佈新版本(熱更)部署
mix edeliver build upgrade --verbose --start-deploy --branch=master --to=0.1.17 mix edeliver deploy upgrade to production --verbose --version=0.1.17
5. 上面的命令能夠編寫一個 SHELL 腳本進行自動化部署get