mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-15 23:52:41 +00:00
only install prod depedencies in release
This commit is contained in:
parent
825b83325a
commit
177ea79549
|
@ -83,9 +83,10 @@ RUN MIX_ENV=prod mix do deps.compile
|
|||
COPY assets/package.json assets/*.sh ./assets/
|
||||
# COPY assets/pnpm-lock.yaml ./assets/
|
||||
COPY assets/yarn.lock ./assets/
|
||||
COPY priv/*.sh ./priv/
|
||||
RUN chmod +x assets/*.sh && sh assets/install.sh
|
||||
RUN chmod +x config/*.sh && chmod +x priv/*.sh && sh config/deps.js.sh
|
||||
RUN chmod +x assets/*.sh
|
||||
RUN chmod +x config/*.sh
|
||||
RUN sh assets/install_app.sh --prod
|
||||
RUN sh config/deps.js.sh --prod
|
||||
|
||||
# Update mime types
|
||||
RUN MIX_ENV=prod mix do deps.clean --build mime
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
SCRIPT_DIR=`dirname "$0"`
|
||||
DIR="${1:-$SCRIPT_DIR}"
|
||||
|
||||
printf "Install the app's main JS deps from $DIR... "
|
||||
|
||||
yarn -v || npm -g install yarn
|
||||
|
||||
cd $DIR && yarn
|
10
assets/install_app.sh
Normal file
10
assets/install_app.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# This script installs the main app's JS deps
|
||||
|
||||
SCRIPT_DIR=`dirname "$0"`
|
||||
|
||||
echo "Install the app's main JS deps from dir '$SCRIPT_DIR' with args '$@'\n"
|
||||
|
||||
yarn -v || npm -g install yarn
|
||||
|
||||
cd $DIR && yarn $@
|
21
assets/install_extensions.sh
Normal file
21
assets/install_extensions.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
# This script is meant to be called by another script defined in each flavour
|
||||
# It cycles through a list of extensions (provided in args) and installs their JS deps, if any
|
||||
|
||||
DEPS=${1}
|
||||
|
||||
for dep in $DEPS ; do
|
||||
echo "Install JS deps from extension '$dep' with args '$2'"
|
||||
|
||||
if cd "forks/$dep/assets" 2>/dev/null ; then
|
||||
yarn $2
|
||||
cd ../../../
|
||||
fi
|
||||
|
||||
if cd "deps/$dep/assets" 2>/dev/null ; then
|
||||
yarn $2
|
||||
cd ../../../
|
||||
else
|
||||
echo "The extension '$dep' is not available\n"
|
||||
fi
|
||||
done
|
|
@ -4,5 +4,5 @@
|
|||
# space seperated
|
||||
DEPS='bonfire_ui_common bonfire_editor_ck bonfire_editor_quill'
|
||||
|
||||
chmod +x ./priv/deps.js.sh
|
||||
./priv/deps.js.sh "$DEPS"
|
||||
chmod +x ./assets/install_extensions.sh
|
||||
./assets/install_extensions.sh "$DEPS" $@
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
DEPS='bonfire_ui_common bonfire_editor_ck bonfire_editor_quill bonfire_geolocate bonfire_ui_kanban'
|
||||
|
||||
chmod +x ./priv/deps.js.sh
|
||||
./priv/deps.js.sh "$DEPS"
|
||||
chmod +x ./assets/install_extensions.sh
|
||||
./assets/install_extensions.sh "$DEPS" $@
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
# any extensions/deps with a package.json in their /assets directory
|
||||
DEPS=''
|
||||
|
||||
chmod +x ./priv/deps.js.sh
|
||||
./priv/deps.js.sh "$DEPS"
|
||||
chmod +x ./assets/install_extensions.sh
|
||||
./assets/install_extensions.sh "$DEPS" $@
|
|
@ -3,5 +3,5 @@
|
|||
# add more modules separated by $IFS
|
||||
DEPS='bonfire_ui_common bonfire_editor_ck bonfire_geolocate'
|
||||
|
||||
chmod +x ./priv/deps.js.sh
|
||||
./priv/deps.js.sh "$DEPS"
|
||||
chmod +x ./assets/install_extensions.sh
|
||||
./assets/install_extensions.sh "$DEPS" $@
|
|
@ -3,5 +3,5 @@
|
|||
# any extensions/deps with a package.json in their /assets directory
|
||||
DEPS='bonfire_ui_common bonfire_editor_ck bonfire_geolocate'
|
||||
|
||||
chmod +x ./priv/deps.js.sh
|
||||
./priv/deps.js.sh "$DEPS"
|
||||
chmod +x ./assets/install_extensions.sh
|
||||
./assets/install_extensions.sh "$DEPS" $@
|
6
justfile
6
justfile
|
@ -193,7 +193,7 @@ update-deps-all:
|
|||
update-dep dep:
|
||||
@chmod +x git-publish.sh && ./git-publish.sh $FORKS_PATH/$dep pull
|
||||
just mix-remote "deps.update $dep"
|
||||
./priv/deps.js.sh $dep
|
||||
./assets/install_extensions.sh $dep
|
||||
|
||||
# Pull the latest commits from all ./forks
|
||||
update-forks:
|
||||
|
@ -225,8 +225,8 @@ deps-clean-api:
|
|||
js-deps-get: js-app-deps-get js-ext-deps-get
|
||||
|
||||
js-app-deps-get:
|
||||
chmod +x ./assets/install.sh
|
||||
just cmd ./assets/install.sh
|
||||
chmod +x ./assets/install_app.sh
|
||||
just cmd ./assets/install_app.sh
|
||||
|
||||
js-ext-deps-get:
|
||||
chmod +x ./config/deps.js.sh
|
||||
|
|
2
mix.exs
2
mix.exs
|
@ -3,7 +3,7 @@ defmodule Bonfire.MixProject do
|
|||
use Mix.Project
|
||||
|
||||
@config [ # TODO: put these in ENV or an external writeable config file similar to deps.*
|
||||
version: "0.3.1-beta.3", # note that the flavour will automatically be added where the dash appears
|
||||
version: "0.3.1-beta.4", # note that the flavour will automatically be added where the dash appears
|
||||
elixir: "~> 1.13",
|
||||
default_flavour: "classic",
|
||||
logo: "assets/static/images/bonfire-icon.png",
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
DEPS=${1}
|
||||
|
||||
for dep in $DEPS ; do
|
||||
printf "Install JS deps from extension %s... " "$dep"
|
||||
|
||||
if cd "forks/$dep/assets" 2>/dev/null ; then
|
||||
yarn
|
||||
cd ../../../
|
||||
fi
|
||||
|
||||
if cd "deps/$dep/assets" 2>/dev/null ; then
|
||||
yarn
|
||||
cd ../../../
|
||||
else
|
||||
printf "The extension %s is not available\n" "$dep"
|
||||
fi
|
||||
done
|
Loading…
Reference in a new issue