mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +01:00
use atd for task planning
This commit is contained in:
parent
2dd98bc20f
commit
757ebdd4ee
@ -47,16 +47,8 @@ function NotfoundController:index(...)
|
||||
local path = WWW_ROOT..DIR_SEP.."scripts"..DIR_SEP..repository..".sh"
|
||||
|
||||
if ulib.exists(path) then
|
||||
result("Build done, log file: https://ci.iohub.dev/log/"..repository.."_"..branch..".txt")
|
||||
local cmd = "/bin/bash "..path.." "..branch
|
||||
local handle = io.popen(cmd)
|
||||
local f = io.open(WWW_ROOT..DIR_SEP.."log"..DIR_SEP..repository.."_"..branch..".txt", "w")
|
||||
for line in handle:lines() do
|
||||
f:write(line)
|
||||
f:write("\n")
|
||||
end
|
||||
handle:close()
|
||||
f:close()
|
||||
result("Build action triggered, log file will soon be available at: https://ci.iohub.dev/log/"..repository.."_"..branch..".txt")
|
||||
os.execute("at now -f "..path)
|
||||
else
|
||||
fail("No build script found")
|
||||
end
|
||||
|
@ -1,25 +1,28 @@
|
||||
#! /bin/bash
|
||||
BRANCH="master"
|
||||
BRANCH="ci"
|
||||
REPO="https://github.com/lxsang/antos.git"
|
||||
DEST="/opt/www/htdocs/os"
|
||||
|
||||
if [ ! -z $1 ]; then
|
||||
BRANCH="$1"
|
||||
fi
|
||||
echo "Build date: $(date)"
|
||||
echo "Building AntOS using branch $BRANCH..."
|
||||
if [ -d "/tmp/ci" ]; then
|
||||
{
|
||||
echo "Build date: $(date)"
|
||||
echo "Building AntOS using branch $BRANCH..."
|
||||
if [ -d "/tmp/ci" ]; then
|
||||
echo "Clean up /tmp/ci"
|
||||
rm -rf /tmp/ci/*
|
||||
else
|
||||
else
|
||||
echo "Creating /tmp/ci"
|
||||
mkdir -p "/tmp/ci"
|
||||
fi
|
||||
cd /tmp/ci || (echo "Unable to change directory to /tmp/ci" && exit 1)
|
||||
echo "Cloning Antos (branch $BRANCH) to /tmp/ci..."
|
||||
git clone -b "$BRANCH" --single-branch --depth=1 "$REPO"
|
||||
npm i @types/jquery
|
||||
cd antos || (echo "Unable to change directory to source code folder" && exit 1)
|
||||
BUILDDIR="$DEST" make release
|
||||
echo "Done!"
|
||||
fi
|
||||
cd /tmp/ci || (echo "Unable to change directory to /tmp/ci" && exit 1)
|
||||
echo "Cloning Antos (branch $BRANCH) to /tmp/ci..."
|
||||
git clone -b "$BRANCH" --single-branch --depth=1 "$REPO"
|
||||
npm i @types/jquery
|
||||
cd antos || (echo "Unable to change directory to source code folder" && exit 1)
|
||||
BUILDDIR="$DEST" make release
|
||||
echo "Done!"
|
||||
} > "/opt/www/htdocs/ci/log/antos_$BRANCH.txt"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user