get_latest_rel_dir.sh 255 B

123456789
  1. #!/bin/sh
  2. get_app() {
  3. mix run --no-start -e "Mix.Project.config[:app] |> IO.puts" | tail -1
  4. }
  5. APP_NAME=`get_app`
  6. find _build/prod/rel/$APP_NAME/releases -type d -exec stat -c "%n %Y" {} \; | sort -rnk 2,2 | head -1 | cut -d ' ' -f 1 | xargs realpath