Etsyと同様に、Chefを使用して現在デプロイされているコミットハッシュをversion.txtファイルに書き込むための最良の方法は何ですか?これが私が思いついたものです。
execute "update_version" do
command git log -1 --format="%H" > public/version.txt
creates "#{app_config['deploy_dir']}/current/public/version.txt"
owner app_user
group app_group
action:run
end