mirror of
https://github.com/penpot/penpot.git
synced 2025-02-01 11:59:17 -05:00
✨ Improve deployment related scripts on exporter.
This commit is contained in:
parent
f8881b3c72
commit
ef0330502b
6 changed files with 40 additions and 6 deletions
|
@ -26,7 +26,7 @@ tmux send-keys -t uxbox 'cd uxbox/exporter' enter C-l
|
||||||
tmux send-keys -t uxbox 'npx shadow-cljs watch main' enter
|
tmux send-keys -t uxbox 'npx shadow-cljs watch main' enter
|
||||||
tmux split-window -v
|
tmux split-window -v
|
||||||
tmux send-keys -t uxbox 'cd uxbox/exporter' enter C-l
|
tmux send-keys -t uxbox 'cd uxbox/exporter' enter C-l
|
||||||
tmux send-keys -t uxbox './bin/wait-and-start' enter
|
tmux send-keys -t uxbox './scripts/wait-and-start.sh' enter
|
||||||
|
|
||||||
tmux new-window -t uxbox:3 -n 'backend'
|
tmux new-window -t uxbox:3 -n 'backend'
|
||||||
tmux select-window -t uxbox:3
|
tmux select-window -t uxbox:3
|
||||||
|
|
19
exporter/scripts/build.sh
Executable file
19
exporter/scripts/build.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source ~/.bashrc
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
npm ci
|
||||||
|
rm -rf target
|
||||||
|
|
||||||
|
export NODE_ENV=production;
|
||||||
|
|
||||||
|
# Build the application
|
||||||
|
npx shadow-cljs release main
|
||||||
|
|
||||||
|
# Remove source
|
||||||
|
rm -rf target/app
|
||||||
|
|
||||||
|
# Copy package*.json files
|
||||||
|
cp package-lock.json target/
|
||||||
|
cp package.json target/
|
|
@ -13,10 +13,8 @@
|
||||||
{:main
|
{:main
|
||||||
{:target :node-script
|
{:target :node-script
|
||||||
:main app.core/main
|
:main app.core/main
|
||||||
:output-to "target/exporter.js"
|
:output-to "target/app.js"
|
||||||
:output-dir "target/exporter/"
|
:output-dir "target/app/"
|
||||||
:asset-path "/js"
|
|
||||||
|
|
||||||
:devtools {:before-load-async app.core/stop
|
:devtools {:before-load-async app.core/stop
|
||||||
:after-load app.core/start}
|
:after-load app.core/start}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ export NODE_ENV=production;
|
||||||
# Clean the output directory
|
# Clean the output directory
|
||||||
npx gulp clean || exit 1;
|
npx gulp clean || exit 1;
|
||||||
|
|
||||||
shadow-cljs release main --config-merge "{:release-version \"${TAG}\"}"
|
npx shadow-cljs release main --config-merge "{:release-version \"${TAG}\"}"
|
||||||
npx gulp build || exit 1;
|
npx gulp build || exit 1;
|
||||||
npx gulp dist:clean || exit 1;
|
npx gulp dist:clean || exit 1;
|
||||||
npx gulp dist:copy || exit 1;
|
npx gulp dist:copy || exit 1;
|
||||||
|
|
17
manage.sh
17
manage.sh
|
@ -64,6 +64,19 @@ function build-frontend {
|
||||||
$IMAGE ./scripts/build-app.sh
|
$IMAGE ./scripts/build-app.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function build-exporter {
|
||||||
|
build-devenv-if-not-exists;
|
||||||
|
|
||||||
|
local IMAGE=$DEVENV_IMGNAME:latest;
|
||||||
|
|
||||||
|
echo "Running development image $IMAGE to build frontend."
|
||||||
|
docker run -t --rm \
|
||||||
|
--mount source=`pwd`,type=bind,target=/home/uxbox/uxbox \
|
||||||
|
--mount source=${HOME}/.m2,type=bind,target=/home/uxbox/.m2 \
|
||||||
|
-w /home/uxbox/uxbox/exporter \
|
||||||
|
$IMAGE ./scripts/build.sh
|
||||||
|
}
|
||||||
|
|
||||||
function build-backend {
|
function build-backend {
|
||||||
rm -rf ./backend/target/dist
|
rm -rf ./backend/target/dist
|
||||||
mkdir -p ./backend/target/dist
|
mkdir -p ./backend/target/dist
|
||||||
|
@ -145,6 +158,10 @@ case $1 in
|
||||||
build-backend
|
build-backend
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
build-exporter)
|
||||||
|
build-exporter
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue