mirror of
https://github.com/natnat-mc/moonbuild
synced 2026-05-28 09:39:40 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 715aa2ebb7 | |||
| bed119a40c | |||
| 57126a7973 | |||
| cd9b0ab159 |
@@ -7,6 +7,7 @@ tasks:
|
|||||||
tasks.build!
|
tasks.build!
|
||||||
sh "rockbuild -m -t #{@v} upload"
|
sh "rockbuild -m -t #{@v} upload"
|
||||||
|
|
||||||
|
watch: => watch {'.'}, {'.git'}, 'live', (glob '*.moon'), pcall -> moonbuild j: true
|
||||||
build: => moonbuild j: true
|
build: => moonbuild j: true
|
||||||
install: => moonbuild 'install', j: true
|
install: => moonbuild 'install', j: true
|
||||||
clean: => moonbuild 'clean'
|
clean: => moonbuild 'clean'
|
||||||
|
|||||||
+9
-3
@@ -166,10 +166,16 @@ mkdir = (dir) ->
|
|||||||
clearentry parent dir
|
clearentry parent dir
|
||||||
|
|
||||||
mkdirs = (dir) ->
|
mkdirs = (dir) ->
|
||||||
return if isdir dir
|
if attr = attributes normalizepath dir
|
||||||
error "Can't mkdirs #{dir}: file exists" if exists dir
|
return if attr.mode == 'directory'
|
||||||
|
error "Can't mkdirs #{dir}: file exists"
|
||||||
mkdirs parent dir
|
mkdirs parent dir
|
||||||
mkdir dir
|
unless pcall -> actualmkdir dir
|
||||||
|
clearentry parent dir
|
||||||
|
clearentry dir
|
||||||
|
error "Failed to mkdirs #{dir}: last mkdir failed" unless isdir dir
|
||||||
|
clearentry parent dir
|
||||||
|
clearentry dir
|
||||||
|
|
||||||
-- from the backend
|
-- from the backend
|
||||||
fs = {k, withcache fn for k, fn in pairs fs}
|
fs = {k, withcache fn for k, fn in pairs fs}
|
||||||
|
|||||||
+19
-6
@@ -973,14 +973,27 @@ mkdir = function(dir)
|
|||||||
end
|
end
|
||||||
local mkdirs
|
local mkdirs
|
||||||
mkdirs = function(dir)
|
mkdirs = function(dir)
|
||||||
if isdir(dir) then
|
do
|
||||||
return
|
local attr = attributes(normalizepath(dir))
|
||||||
end
|
if attr then
|
||||||
if exists(dir) then
|
if attr.mode == 'directory' then
|
||||||
error("Can't mkdirs " .. tostring(dir) .. ": file exists")
|
return
|
||||||
|
end
|
||||||
|
error("Can't mkdirs " .. tostring(dir) .. ": file exists")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
mkdirs(parent(dir))
|
mkdirs(parent(dir))
|
||||||
return mkdir(dir)
|
if not (pcall(function()
|
||||||
|
return actualmkdir(dir)
|
||||||
|
end)) then
|
||||||
|
clearentry(parent(dir))
|
||||||
|
clearentry(dir)
|
||||||
|
if not (isdir(dir)) then
|
||||||
|
error("Failed to mkdirs " .. tostring(dir) .. ": last mkdir failed")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
clearentry(parent(dir))
|
||||||
|
return clearentry(dir)
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local _tbl_0 = { }
|
local _tbl_0 = { }
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
build = {
|
||||||
|
install = {
|
||||||
|
bin = {
|
||||||
|
moonbuild = "out/moonbuild"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
modules = {
|
||||||
|
moonbuild = "out/moonbuild.lua"
|
||||||
|
},
|
||||||
|
type = "builtin"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1",
|
||||||
|
"argparse >= 0.7.1-1",
|
||||||
|
"moonscript >= 0.5.0-1"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
detailed = "moonbuild is a small build system that simplifies your build definitions by allowing you to use declarative as well as imperative rules. It represents the build as a DAG with explicit ordering, and doesn't give you any default confusing rules (unlike make). If you can, installing luaposix and/or luafilesystem will speed up builds and increase stability.\n",
|
||||||
|
summary = "Small build system in between make and a build.sh"
|
||||||
|
}
|
||||||
|
package = "moonbuild"
|
||||||
|
rockspec_format = "3.0"
|
||||||
|
source = {
|
||||||
|
tag = "v2.5.0",
|
||||||
|
url = "git://github.com/natnat-mc/moonbuild"
|
||||||
|
}
|
||||||
|
version = "2.5.0-1"
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
build = {
|
||||||
|
install = {
|
||||||
|
bin = {
|
||||||
|
moonbuild = "out/moonbuild"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
modules = {
|
||||||
|
moonbuild = "out/moonbuild.lua"
|
||||||
|
},
|
||||||
|
type = "builtin"
|
||||||
|
}
|
||||||
|
dependencies = {
|
||||||
|
"lua >= 5.1",
|
||||||
|
"argparse >= 0.7.1-1",
|
||||||
|
"moonscript >= 0.5.0-1"
|
||||||
|
}
|
||||||
|
description = {
|
||||||
|
detailed = "moonbuild is a small build system that simplifies your build definitions by allowing you to use declarative as well as imperative rules. It represents the build as a DAG with explicit ordering, and doesn't give you any default confusing rules (unlike make). If you can, installing luaposix and/or luafilesystem will speed up builds and increase stability.\n",
|
||||||
|
summary = "Small build system in between make and a build.sh"
|
||||||
|
}
|
||||||
|
package = "moonbuild"
|
||||||
|
rockspec_format = "3.0"
|
||||||
|
source = {
|
||||||
|
tag = "v2.5.1",
|
||||||
|
url = "git://github.com/natnat-mc/moonbuild"
|
||||||
|
}
|
||||||
|
version = "2.5.1-1"
|
||||||
Reference in New Issue
Block a user