Skip to content

Commit f3cee6e

Browse files
Build - make misc updates for having precompiled tau assets in build
Updates: * ignore precompiled assets in clean scripts * remove precompiled assets in gitignore * run `assets.deploy.prod` mix command when doing pre-tau-dev-init * remove `assets.deploy.prod` command from linux offline build and add `deps.compile` * respect MIX_DEPS_PATH from tailwind config * remove reliance on tailwind/esbuild in test env
1 parent f9015ee commit f3cee6e

12 files changed

+19
-24
lines changed

app/linux-clean.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ rm -rf external/build
1212

1313
echo "Cleaning out BEAM distribution..."
1414
rm -rf server/beam/tau/_build
15-
rm -rf server/beam/tau/priv/static/assets
1615
rm -rf server/beam/tau/priv/*.{so,dylib,dll}
17-
rm -rf server/beam/tau/priv/static/cache_manifest.json
18-
find . -path './server/beam/tau/priv/static/*' -name '*.gz' -delete
19-
find . -path './server/beam/tau/priv/static/*' -name '*-????????????????????????????????.*' -delete
16+
if [ "$MIX_ENV" == dev ]; then
17+
rm -rf server/beam/tau/priv/static/assets
18+
rm -rf server/beam/tau/priv/static/cache_manifest.json
19+
find . -path './server/beam/tau/priv/static/*' -name '*.gz' -delete
20+
find . -path './server/beam/tau/priv/static/*' -name '*-????????????????????????????????.*' -delete
21+
fi
2022

2123
echo "Cleaning completed"
2224

app/linux-pre-tau-dev-init.sh

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ set -e # Quit script on error
33
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44
WORKING_DIR="$(pwd)"
55

6-
MIX_ENV=prod mix local.hex --force
7-
MIX_ENV=prod mix local.rebar --force
8-
MIX_ENV=prod mix deps.get
6+
MIX_ENV=dev mix local.hex --force
7+
MIX_ENV=dev mix local.rebar --force
8+
MIX_ENV=dev mix deps.get
99
MIX_ENV=dev mix tailwind.install
1010
MIX_ENV=dev mix esbuild.install
11-
11+
MIX_ENV=dev mix assets.deploy.prod
1212

1313
# Restore working directory as it was prior to this script running...
1414
cd "${WORKING_DIR}"

app/linux-pre-tau-prod-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ echo "Compiling Erlang/Elixir files..."
3131
cd "${SCRIPT_DIR}"/server/beam/tau
3232

3333
if [ "$offline_build" == true ]; then
34-
MIX_ENV=prod mix assets.deploy.prod
34+
MIX_ENV=prod mix deps.compile
3535
MIX_ENV=prod mix release --overwrite --no-deps-check
3636
else
3737
MIX_ENV=prod mix local.hex --force

app/mac-pre-tau-dev-init.sh

100644100755
File mode changed.

app/pi-pre-tau-dev-init.sh

100644100755
File mode changed.

app/server/beam/tau/.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ tau-*.tar
2424

2525
# Temporary files, for example, from tests.
2626
/tmp/
27-
# Ignore assets that are produced by build tools.
28-
/priv/static/assets/
29-
30-
# Ignore digested assets cache.
31-
/priv/static/cache_manifest.json
3227

3328
# In case you use Node.js/npm, you want to ignore these.
3429
npm-debug.log
@@ -38,7 +33,5 @@ npm-debug.log
3833
/priv/*.so
3934
/priv/*.dylib
4035
/priv/*.dll
41-
/priv/static/**/*.gz
42-
/priv/static/**/*-????????????????????????????????.*
4336
/ebin/*
4437
/log/*

app/server/beam/tau/assets/tailwind.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
content: [
55
"../lib/*_web/**/*.*ex",
66
"./js/**/*.js",
7-
"../deps/petal_components/**/*.*ex",
7+
(process.env.MIX_DEPS_PATH || "../deps") + "/petal_components/**/*.*ex",
88
],
99
theme: {
1010
extend: {

app/server/beam/tau/boot-lin.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ elif [ $TAU_ENV = "test" ]
3333
then
3434
export TAU_MIDI_ENABLED=false
3535
export TAU_LINK_ENABLED=false
36-
mix assets.deploy.dev
3736
mix run --no-halt > log/tau_stdout.log 2>&1
3837
else
3938
echo "Unknown TAU_ENV ${TAU_ENV} - expecting one of prod, dev or test."

app/server/beam/tau/boot-mac.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ elif [ $TAU_ENV = "test" ]
3333
then
3434
export TAU_MIDI_ENABLED=false
3535
export TAU_LINK_ENABLED=false
36-
mix assets.deploy.dev
3736
mix run --no-halt > log/tau_stdout.log 2>&1
3837
else
3938
echo "Unknown TAU_ENV ${TAU_ENV} - expecting one of prod, dev or test."

app/server/beam/tau/boot-win.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,5 @@ IF "%TAU_ENV%" == "dev" (
4141
IF "%TAU_ENV%" == "test" (
4242
set TAU_MIDI_ENABLED=false
4343
set TAU_LINK_ENABLED=false
44-
mix assets.deploy.dev
4544
mix run --no-halt > log\tau_stdout.log 2>&1
4645
)

0 commit comments

Comments
 (0)