Skip to content

Commit 4594294

Browse files
authored
chore: make mix.env settable (#47)
When building locally, it's helpful to set the mix.env to dev so burriton _actually creates a new build_. This change allows one to set the MIX_ENV envar when running just.
1 parent 9830ada commit 4594294

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

justfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,28 +74,27 @@ release-local: (deps "expert") (compile "engine") build-engine
7474
echo "unsupported OS/Arch combination: {{ local_target }}"
7575
exit 1
7676
fi
77-
MIX_ENV=prod EXPERT_RELEASE_MODE=burrito BURRITO_TARGET="{{ local_target }}" mix release --overwrite
77+
MIX_ENV={{ env('MIX_ENV', 'prod')}} EXPERT_RELEASE_MODE=burrito BURRITO_TARGET="{{ local_target }}" mix release --overwrite
7878

7979
[windows]
8080
release-local: (deps "expert") (compile "engine") build-engine
8181
# idk actually how to set env vars like this on windows, might crash
82-
EXPERT_RELEASE_MODE=burrito BURRITO_TARGET="windows_amd64" MIX_ENV=prod mix release --no-compile
82+
EXPERT_RELEASE_MODE=burrito BURRITO_TARGET="windows_amd64" MIX_ENV={{ env('MIX_ENV', 'prod')}} mix release --no-compile
8383

8484
[doc('Build releases for all target platforms')]
8585
release-all: (deps "expert") (compile "engine") build-engine
8686
#!/usr/bin/env bash
8787
cd apps/expert
88-
EXPERT_RELEASE_MODE=burrito MIX_ENV=prod mix release
88+
EXPERT_RELEASE_MODE=burrito MIX_ENV={{ env('MIX_ENV', 'prod')}} mix release --no-compile
8989

9090
[doc('Build a plain release without burrito')]
9191
release-plain: (compile "engine")
9292
#!/usr/bin/env bash
9393
cd apps/expert
94-
MIX_ENV=prod mix release plain --overwrite
94+
MIX_ENV={{ env('MIX_ENV', 'prod')}} mix release plain --overwrite
9595

9696
[doc('Compiles .github/matrix.json')]
9797
compile-ci-matrix:
9898
elixir matrix.exs
9999

100100
default: release-local
101-

0 commit comments

Comments
 (0)