Closed pierot closed 5 years ago
I've pushed a fix for this, since I believe what you are expecting is probably correct, but it isn't quite as black and white as it seems.
The issue is that when a release is installed, we're still running the old versions upgrade scripts, which are still pointing to the old release, code paths as well. In this case, your custom task is running using the old versions code, which in some situations likely makes a lot of sense. On the other hand, it means that any post_upgrade hooks in the new release aren't executed until it is being upgraded from.
I believe the most intuitive thing here is what you expect, that the post upgrade hook is run using new code, but I can see the potential for that to be a problem. I suspect nobody has noticed this so far, as they probably aren't doing anything that sensitive to paths in those hooks, and you happen to be the first to have hit the issue.
In any case, this fix is available on both master and 2.0.x branches; the next release will be 2.1.0 from master, so if you want the fix without making the changes necessary to get Elixir 1.9 comptability, then update your distillery dep to point to the 2.0.x branch, which will be getting maintenance fixes from now on.
Steps to reproduce
I have several
post_upgrade_hooks
andpost_start hooks
: migrate, seed and symlink_assets. The tasks are defined inMyApp.ReleaseTasks
from the shell scripts:Example .sh:
config.exs:
symlink_assets
task:Verbose Logs
Even calling the command on the server produces a path for the previous release:
Description of issue
ln -sfn
command should be the latest release path:0.5.1+2011-..
instead of0.5.1+2010-..
.