1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2025-04-20 02:26:45 +02:00

fix script error

This commit is contained in:
lxsang 2020-06-26 10:31:46 +02:00
parent a03b591de8
commit 9dc4065678
2 changed files with 15 additions and 11 deletions

View File

@ -1,8 +1,8 @@
#! /bin/bash #! /bin/bash
BRANCH="ci" BRANCH="ci"
PRJ="antd-web-apps" PRJ="antd-web-apps"
DEST="/tmp/wapp" DEST="/opt/www/htdocs"
# /opt/www/htdocs
REPO="https://github.com/lxsang/$PRJ.git" REPO="https://github.com/lxsang/$PRJ.git"

View File

@ -1,28 +1,32 @@
#! /bin/bash #! /bin/bash
BRANCH="ci" BRANCH="ci"
REPO="https://github.com/lxsang/antos.git" PRJ="antos"
DEST="/opt/www/htdocs/os" DEST="/opt/www/htdocs/os"
# /opt/www/htdocs
REPO="https://github.com/lxsang/$PRJ.git"
if [ ! -z $1 ]; then if [ ! -z $1 ]; then
BRANCH="$1" BRANCH="$1"
fi fi
{ {
echo "Build date: $(date)" echo "Build date: $(date)"
echo "Building AntOS using branch $BRANCH..." echo "Building $PRJ using branch $BRANCH..."
if [ -d "/tmp/ci" ]; then if [ -d "/tmp/ci/$PRJ" ]; then
echo "Clean up /tmp/ci" echo "Clean up /tmp/ci/$PRJ"
rm -rf /tmp/ci/* rm -rf /tmp/ci/$PRJ
else else
echo "Creating /tmp/ci" echo "Creating /tmp/ci/"
mkdir -p "/tmp/ci" mkdir -p "/tmp/ci"
fi fi
cd /tmp/ci || (echo "Unable to change directory to /tmp/ci" && exit 1) cd /tmp/ci || (echo "Unable to change directory to /tmp/ci" && exit 1)
echo "Cloning Antos (branch $BRANCH) to /tmp/ci..." echo "Cloning $PRJ (branch $BRANCH) to /tmp/ci..."
git clone -b "$BRANCH" --single-branch --depth=1 "$REPO" git clone -b "$BRANCH" --single-branch --depth=1 "$REPO"
cd "$PRJ" || (echo "Unable to change directory to source code folder" && exit 1)
npm i @types/jquery npm i @types/jquery
cd antos || (echo "Unable to change directory to source code folder" && exit 1) mkdir -p "$DEST"
BUILDDIR="$DEST" make release BUILDDIR="$DEST" make release
echo "Done!" echo "Done!"
} > "/opt/www/htdocs/ci/log/antos_$BRANCH.txt" } 2>&1 | tee "/opt/www/htdocs/ci/log/${PRJ}_${BRANCH}.txt"