mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
🔥 Remove legacy code from manage.sh.
This commit is contained in:
parent
3681c17f4b
commit
a16f4393b9
1 changed files with 3 additions and 86 deletions
83
manage.sh
83
manage.sh
|
@ -87,15 +87,11 @@ function build-backend {
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-app-bundle {
|
function build-app-bundle {
|
||||||
local build_enabled=${PENPOT_BUNDLE_BUILD:-"true"};
|
|
||||||
local version="$CURRENT_VERSION";
|
local version="$CURRENT_VERSION";
|
||||||
local name="penpot-app-$CURRENT_BRANCH";
|
|
||||||
local bundle_dir="./bundle-app";
|
local bundle_dir="./bundle-app";
|
||||||
|
|
||||||
if [ $build_enabled == "true" ]; then
|
|
||||||
build "frontend";
|
build "frontend";
|
||||||
build "backend";
|
build "backend";
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf $bundle_dir
|
rm -rf $bundle_dir
|
||||||
mkdir -p $bundle_dir;
|
mkdir -p $bundle_dir;
|
||||||
|
@ -113,14 +109,10 @@ function build-app-bundle {
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-exporter-bundle {
|
function build-exporter-bundle {
|
||||||
local build_enabled=${PENPOT_BUNDLE_BUILD:-"true"};
|
|
||||||
local version="$CURRENT_VERSION";
|
local version="$CURRENT_VERSION";
|
||||||
local name="penpot-exporter-$CURRENT_BRANCH";
|
|
||||||
local bundle_dir="./bundle-exporter";
|
local bundle_dir="./bundle-exporter";
|
||||||
|
|
||||||
if [ $build_enabled == "true" ]; then
|
|
||||||
build "exporter";
|
build "exporter";
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf $bundle_dir;
|
rm -rf $bundle_dir;
|
||||||
cp -r ./exporter/target $bundle_dir;
|
cp -r ./exporter/target $bundle_dir;
|
||||||
|
@ -132,81 +124,6 @@ function build-exporter-bundle {
|
||||||
echo $version > $bundle_dir/version.txt
|
echo $version > $bundle_dir/version.txt
|
||||||
}
|
}
|
||||||
|
|
||||||
function build-image {
|
|
||||||
local image=$1;
|
|
||||||
local tag=$2;
|
|
||||||
local docker_image="$ORGANIZATION/$image";
|
|
||||||
|
|
||||||
set -x
|
|
||||||
pushd ./docker/images;
|
|
||||||
docker buildx build --platform linux/amd64 -t $docker_image:$tag -f Dockerfile.$image .;
|
|
||||||
popd;
|
|
||||||
}
|
|
||||||
|
|
||||||
function build-images {
|
|
||||||
local version="$CURRENT_VERSION";
|
|
||||||
local bundle_file="penpot-app-$CURRENT_BRANCH.tar.lz4";
|
|
||||||
local bundle_exporter_file="penpot-exporter-$CURRENT_BRANCH.tar.lz4";
|
|
||||||
|
|
||||||
if [ ! -f $bundle_file ]; then
|
|
||||||
echo "File '$bundle_file' does not exists.";
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f $bundle_exporter_file ]; then
|
|
||||||
echo "File '$bundle_exporter_file' does not exists.";
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
local bundle_file_path=`readlink -f $bundle_file`;
|
|
||||||
local bundle_exporter_file_path=`readlink -f $bundle_exporter_file`;
|
|
||||||
|
|
||||||
rm -rf ./docker/images/bundle-app;
|
|
||||||
rm -rf ./docker/images/bundle-exporter;
|
|
||||||
|
|
||||||
mkdir -p ./docker/images/bundle-app;
|
|
||||||
mkdir -p ./docker/images/bundle-exporter;
|
|
||||||
|
|
||||||
pushd ./docker/images/bundle-app;
|
|
||||||
tar -I lz4 -xvf $bundle_file_path;
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd ./docker/images/bundle-exporter;
|
|
||||||
tar -I lz4 -xvf $bundle_exporter_file_path;
|
|
||||||
popd
|
|
||||||
|
|
||||||
build-image "backend" $CURRENT_BRANCH;
|
|
||||||
build-image "frontend" $CURRENT_BRANCH;
|
|
||||||
build-image "exporter" $CURRENT_BRANCH;
|
|
||||||
}
|
|
||||||
|
|
||||||
# function publish-latest-images {
|
|
||||||
# if [ $CURRENT_BRANCH != "main" ]; then
|
|
||||||
# echo "Latest image can only be build from main branch.";
|
|
||||||
# exit 1;
|
|
||||||
# fi;
|
|
||||||
|
|
||||||
# set -x
|
|
||||||
|
|
||||||
# docker tag $ORGANIZATION/frontend:$CURRENT_BRANCH $ORGANIZATION/frontend:latest;
|
|
||||||
# docker tag $ORGANIZATION/backend:$CURRENT_BRANCH $ORGANIZATION/backend:latest;
|
|
||||||
# docker tag $ORGANIZATION/exporter:$CURRENT_BRANCH $ORGANIZATION/exporter:latest;
|
|
||||||
|
|
||||||
# # docker push $ORGANIZATION/frontend:$CURRENT_VERSION;
|
|
||||||
# # docker push $ORGANIZATION/backend:$CURRENT_VERSION;
|
|
||||||
# # docker push $ORGANIZATION/exporter:$CURRENT_VERSION;
|
|
||||||
# docker push $ORGANIZATION/frontend:latest;
|
|
||||||
# docker push $ORGANIZATION/backend:latest;
|
|
||||||
# docker push $ORGANIZATION/exporter:latest;
|
|
||||||
# }
|
|
||||||
|
|
||||||
# function publish-snapshot-images {
|
|
||||||
# set -x
|
|
||||||
# docker push $ORGANIZATION/frontend:$CURRENT_BRANCH;
|
|
||||||
# docker push $ORGANIZATION/backend:$CURRENT_BRANCH;
|
|
||||||
# docker push $ORGANIZATION/exporter:$CURRENT_BRANCH;
|
|
||||||
# }
|
|
||||||
|
|
||||||
function usage {
|
function usage {
|
||||||
echo "PENPOT build & release manager"
|
echo "PENPOT build & release manager"
|
||||||
echo "USAGE: $0 OPTION"
|
echo "USAGE: $0 OPTION"
|
||||||
|
|
Loading…
Reference in a new issue