forked from bitwalker/distillery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix plugins only specified in an environment
When specifying a plugin in an environment only (and not a release) the plugin is prepended to the profile.plugins attribute. However since this defaults to nil, the result is an improper list in the format: [SampleApp.TestPlugin | nil] This commit fixes it so that the profile.plugins defaults to an empty list, resulting in: [SampleApp.TestPlugin | []] A test has been added which loads a sample plugin from the rel directory and verifies that the list contains a list with the plugin. This test will fail when the list is an improper list. When merging the profile and environment, there is a check in place so that lists are correctly merged together. The integration test has been modified to ensure that all the plugins run.
- Loading branch information
Showing
7 changed files
with
57 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
defmodule SampleApp.ReleasePlugin do | ||
use Mix.Releases.Plugin | ||
|
||
def before_assembly(_), do: info("Release Plugin - before_assembly") && nil | ||
def after_assembly(_), do: info("Release Plugin - after_assembly") && nil | ||
|
||
def before_package(_), do: info("Release Plugin - before_package") && nil | ||
def after_package(_), do: info("Release Plugin - after_package") && nil | ||
def after_cleanup(_), do: info("Release Plugin - after_cleanup") && nil | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
defmodule SampleApp.ProdPlugin do | ||
use Mix.Releases.Plugin | ||
|
||
def before_assembly(_), do: info("Prod Plugin - before_assembly") && nil | ||
def after_assembly(_), do: info("Prod Plugin - after_assembly") && nil | ||
|
||
def before_package(_), do: info("Prod Plugin - before_package") && nil | ||
def after_package(_), do: info("Prod Plugin - after_package") && nil | ||
def after_cleanup(_), do: info("Prod Plugin - after_cleanup") && nil | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters