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:
parent
590c57c18d
commit
e165ca7c3b
4 changed files with 17 additions and 11 deletions
|
@ -150,6 +150,7 @@ EXPOSE 9090
|
||||||
COPY files/start-tmux.sh /home/start-tmux.sh
|
COPY files/start-tmux.sh /home/start-tmux.sh
|
||||||
COPY files/entrypoint.sh /home/entrypoint.sh
|
COPY files/entrypoint.sh /home/entrypoint.sh
|
||||||
COPY files/init.sh /home/init.sh
|
COPY files/init.sh /home/init.sh
|
||||||
|
COPY files/bashrc /home/penpot/.bashrc
|
||||||
|
|
||||||
ENTRYPOINT ["/home/entrypoint.sh"]
|
ENTRYPOINT ["/home/entrypoint.sh"]
|
||||||
CMD ["/home/init.sh"]
|
CMD ["/home/init.sh"]
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
export PATH=$HOME/.local/bin:/usr/local/nodejs/bin:$PATH
|
export PATH=$HOME/.local/bin:/usr/local/nodejs/bin:$PATH
|
||||||
|
|
||||||
alias l='ls --color -GFlh'
|
alias l='ls --color -GFlh'
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ -z "${TAG}" ]; then
|
if [ -z "${TAG}" ]; then
|
||||||
export TAG=`git log -n 1 --pretty=format:%H -- ./`
|
export TAG=$(git log -n 1 --pretty=format:%H -- ./);
|
||||||
fi
|
fi
|
||||||
|
|
||||||
yarn install
|
yarn install
|
||||||
|
|
22
manage.sh
22
manage.sh
|
@ -63,10 +63,8 @@ function run-devenv {
|
||||||
function build {
|
function build {
|
||||||
pull-devenv-if-not-exists;
|
pull-devenv-if-not-exists;
|
||||||
docker volume create $DEVENV_PNAME_user_data;
|
docker volume create $DEVENV_PNAME_user_data;
|
||||||
|
|
||||||
echo "Running development image $IMAGE to build frontend."
|
|
||||||
docker run -t --rm \
|
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 \
|
--mount source=`pwd`,type=bind,target=/home/penpot/penpot \
|
||||||
-e EXTERNAL_UID=$CURRENT_USER_ID \
|
-e EXTERNAL_UID=$CURRENT_USER_ID \
|
||||||
-w /home/penpot/penpot/$1 \
|
-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/exporter/version.txt
|
||||||
echo $CURRENT_GIT_TAG > ./bundle/version.txt
|
echo $CURRENT_GIT_TAG > ./bundle/version.txt
|
||||||
|
|
||||||
pushd bundle/
|
local generate_tar=${PENPOT_BUILD_GENERATE_TAR:-"true"};
|
||||||
tar -cvf ../$name.tar *;
|
|
||||||
popd
|
|
||||||
|
|
||||||
xz -vez1f -T4 $name.tar
|
if [ $generate_tar == "true" ]; then
|
||||||
|
pushd bundle/
|
||||||
|
tar -cvf ../$name.tar *;
|
||||||
|
popd
|
||||||
|
|
||||||
echo "##############################################################";
|
xz -vez1f -T4 $name.tar
|
||||||
echo "# Generated $name.tar.xz";
|
|
||||||
echo "##############################################################";
|
echo "##############################################################";
|
||||||
|
echo "# Generated $name.tar.xz";
|
||||||
|
echo "##############################################################";
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-image {
|
function build-image {
|
||||||
|
|
Loading…
Add table
Reference in a new issue