Quellcode durchsuchen

Document access to latest release

theenglishway (time) vor 4 Jahren
Ursprung
Commit
47c80baf75
1 geänderte Dateien mit 9 neuen und 1 gelöschten Zeilen
  1. 9 1
      README.md

+ 9 - 1
README.md

@@ -6,7 +6,7 @@ of mine in the aspects of build, integration and deployment.
 ## Goals
 
 * [x] Document build
-* [] Implement and document cross-build
+* [x] Implement and document cross-build
 * [] Install the project as a systemd service
 * [x] Handle the current version via a git tag
 * [] Build as `dev` or `prod`
@@ -66,3 +66,11 @@ In production mode some configuration is extracted from the environment.
 * Compile static assets into `priv/static` : `npm run deploy --prefix ./assets`
 * Compress and digest static assets `mix phx.digest`
 * Start the server : `MIX_ENV=prod DATABASE_URL=db-url SECRET_KEY_BASE=secret_key PORT=port mix phx.server`
+
+### Getting the latest release
+
+The latest release can be easily found using the following shell command :
+`find _build/prod/ -name "*.tar.gz" -exec stat -c "%n %Y" {} \; | sort -rnk 2,2 | head -1 | cut -d ' ' -f 1 | xargs realpath` 
+
+To find the directory of the latest release :
+`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`