0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-11 01:28:30 -05:00

Add improvements to manage.sh and devenv related to deployment.

This commit is contained in:
Andrey Antukh 2020-12-02 16:44:21 +01:00
parent 590c57c18d
commit e165ca7c3b
4 changed files with 17 additions and 11 deletions

View file

@ -150,6 +150,7 @@ EXPOSE 9090
COPY files/start-tmux.sh /home/start-tmux.sh
COPY files/entrypoint.sh /home/entrypoint.sh
COPY files/init.sh /home/init.sh
COPY files/bashrc /home/penpot/.bashrc
ENTRYPOINT ["/home/entrypoint.sh"]
CMD ["/home/init.sh"]

View file

@ -1,3 +1,5 @@
#!/usr/bin/env bash
export PATH=$HOME/.local/bin:/usr/local/nodejs/bin:$PATH
alias l='ls --color -GFlh'

View file

@ -1,10 +1,11 @@
#!/usr/bin/env bash
source ~/.bashrc
set -ex
if [ -z "${TAG}" ]; then
export TAG=`git log -n 1 --pretty=format:%H -- ./`
export TAG=$(git log -n 1 --pretty=format:%H -- ./);
fi
yarn install

View file

@ -63,10 +63,8 @@ function run-devenv {
function build {
pull-devenv-if-not-exists;
docker volume create $DEVENV_PNAME_user_data;
echo "Running development image $IMAGE to build frontend."
docker run -t --rm \
--mount source=$DEVENV_PNAME_user_data,type=volume,target=/home/penpot/ \
--mount source=${DEVENV_PNAME}_user_data,type=volume,target=/home/penpot/ \
--mount source=`pwd`,type=bind,target=/home/penpot/penpot \
-e EXTERNAL_UID=$CURRENT_USER_ID \
-w /home/penpot/penpot/$1 \
@ -103,15 +101,19 @@ function build-bundle {
echo $CURRENT_GIT_TAG > ./bundle/exporter/version.txt
echo $CURRENT_GIT_TAG > ./bundle/version.txt
pushd bundle/
tar -cvf ../$name.tar *;
popd
local generate_tar=${PENPOT_BUILD_GENERATE_TAR:-"true"};
xz -vez1f -T4 $name.tar
if [ $generate_tar == "true" ]; then
pushd bundle/
tar -cvf ../$name.tar *;
popd
echo "##############################################################";
echo "# Generated $name.tar.xz";
echo "##############################################################";
xz -vez1f -T4 $name.tar
echo "##############################################################";
echo "# Generated $name.tar.xz";
echo "##############################################################";
fi
}
function build-image {