mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +01:00
add ci control
This commit is contained in:
parent
0da98332c5
commit
41b25648ac
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
||||
BUILDDIR?=./build
|
||||
PROJS?=grs info blog apps os doc
|
||||
PROJS?=grs info blog apps os doc ci
|
||||
copyfiles = index.ls mimes.json
|
||||
main: copy
|
||||
for f in $(PROJS); do BUILDDIR=$(BUILDDIR)/"$${f}" make -C "$${f}" ; done
|
||||
|
5
ci/Makefile
Normal file
5
ci/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
copyfiles = router.lua
|
||||
|
||||
main:
|
||||
- mkdir $(BUILDDIR)
|
||||
cp -rvf $(copyfiles) $(BUILDDIR)
|
46
ci/router.lua
Normal file
46
ci/router.lua
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
-- the rewrite rule for the framework
|
||||
-- should be something like this
|
||||
-- ^\/apps\/+(.*)$ = /apps/router.lua?r=<1>&<query>
|
||||
-- some global variables
|
||||
DIR_SEP = "/"
|
||||
WWW_ROOT = __ROOT__.."/ci"
|
||||
if HEADER.Host then
|
||||
HTTP_ROOT= "https://"..HEADER.Host
|
||||
else
|
||||
HTTP_ROOT = "https://ci.iohub.dev"
|
||||
end
|
||||
-- class path: path.to.class
|
||||
BASE_FRW = ""
|
||||
-- class path: path.to.class
|
||||
CONTROLLER_ROOT = BASE_FRW.."apps.controllers"
|
||||
MODEL_ROOT = BASE_FRW.."apps.models"
|
||||
-- file path: path/to/file
|
||||
VIEW_ROOT = WWW_ROOT..DIR_SEP.."views"
|
||||
LOG_ROOT = WWW_ROOT..DIR_SEP.."logs"
|
||||
|
||||
-- require needed library
|
||||
require(BASE_FRW.."silk.api")
|
||||
|
||||
function NotfoundController:index(...)
|
||||
local args = {...}
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
-- registry object store global variables
|
||||
local REGISTRY = {}
|
||||
-- set logging level
|
||||
REGISTRY.logger = Logger:new{ levels = {INFO = false, ERROR = false, DEBUG = false}}
|
||||
|
||||
REGISTRY.layout = 'default'
|
||||
REGISTRY.fileaccess = false
|
||||
|
||||
local router = Router:new{registry = REGISTRY}
|
||||
REGISTRY.router = router
|
||||
router:setPath(CONTROLLER_ROOT)
|
||||
--router:route('edit', 'post/edit', "ALL" )
|
||||
|
||||
router:route('default', default_routes_dependencies )
|
||||
router:delegate()
|
||||
|
@ -8,7 +8,7 @@ WWW_ROOT = __ROOT__.."/get"
|
||||
if HEADER.Host then
|
||||
HTTP_ROOT= "https://"..HEADER.Host
|
||||
else
|
||||
HTTP_ROOT = "https://get.makeand.run"
|
||||
HTTP_ROOT = "https://get.iohub.dev"
|
||||
end
|
||||
-- class path: path.to.class
|
||||
BASE_FRW = ""
|
||||
|
Loading…
Reference in New Issue
Block a user