bitwalker / bitwalker/distillery
Release on Windows uses wrong script dir
- Dominant language
- Elixir
- Stars
- 3k
- Forks
- 398
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to reproduce
Create a release on Windows and execute it using the provided batch file.
### Verbose Logs
```
get-content : Cannot find path 'C:\Users\l_m_s\Documents\apps\some_app\_build\dev\rel\releases\sys.config'
because it does not exist.
At line:1 char:12
+ $content = get-content C:\Users\l_m_s\Documents\apps\some_app ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\l_m_s\...ases\sys.config:String) [Get-Content], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
Exception calling "Matches" with "2" argument(s): "Value cannot be null.
Parameter name: input"
At line:1 char:108
+ ... sys.config; [regex]::matches($content, '\${[\w\d_-]+}') | foreach { $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentNullException
```
### Description of issue
- What are the expected results?
It's looking in `\_build\dev\rel\releases`, but should be looking in `\_build\dev\rel\dev_some_app\releases`
- What version of Distillery?
v2.0.0
- What OS, Erlang/Elixir versions are you seeing this issue on?
Elixir v1.6.6, Erlang v20.1
- If possible, also provide your `rel/config.exs`, as it is often
my first troubleshooting question, and you'll save us both time :)
```
Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
default_release: :dev_some_app,
default_environment: :dev
environment :dev do
set dev_mode: false
set include_erts: true
set cookie: :"dev_my_app"
set plugins: [Embed.PhoenixDigestTask]
end
environment :prod do
set include_erts: true
set include_src: false
set cookie: :"prod_my_app"
set plugins: [Embed.PhoenixDigestTask]
end
release :dev_some_app do
set version: "#{System.get_env("RELEASE_VERSION")}"
set applications: [
runtime_tools: :permanent,
utils: :permanent,
itest: :permanent,
status: :permanent,
embed: :permanent
]
set commands: []
end
release :prod_some_app do
set version: "#{System.get_env("RELEASE_VERSION")}"
set applications: [
runtime_tools: :permanent,
utils: :permanent,
status: :permanent,
embed: :permanent
]
set commands: []
end
```
- additional info
If I remove these lines (around line 20) from dev_some_app.bat, then it runs fine:
```
for %%A in ("%script_dir%\..\..") do (
set release_root_dir=%%~fA
)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.