mirror of
https://github.com/natnat-mc/moonbuild
synced 2026-05-28 03:59:39 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 715aa2ebb7 | |||
| bed119a40c | |||
| 57126a7973 | |||
| cd9b0ab159 |
@@ -7,6 +7,7 @@ tasks:
|
||||
tasks.build!
|
||||
sh "rockbuild -m -t #{@v} upload"
|
||||
|
||||
watch: => watch {'.'}, {'.git'}, 'live', (glob '*.moon'), pcall -> moonbuild j: true
|
||||
build: => moonbuild j: true
|
||||
install: => moonbuild 'install', j: true
|
||||
clean: => moonbuild 'clean'
|
||||
|
||||
+9
-3
@@ -166,10 +166,16 @@ mkdir = (dir) ->
|
||||
clearentry parent dir
|
||||
|
||||
mkdirs = (dir) ->
|
||||
return if isdir dir
|
||||
error "Can't mkdirs #{dir}: file exists" if exists dir
|
||||
if attr = attributes normalizepath dir
|
||||
return if attr.mode == 'directory'
|
||||
error "Can't mkdirs #{dir}: file exists"
|
||||
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
|
||||
fs = {k, withcache fn for k, fn in pairs fs}
|
||||
|
||||
+19
-6
@@ -973,14 +973,27 @@ mkdir = function(dir)
|
||||
end
|
||||
local mkdirs
|
||||
mkdirs = function(dir)
|
||||
if isdir(dir) then
|
||||
return
|
||||
end
|
||||
if exists(dir) then
|
||||
error("Can't mkdirs " .. tostring(dir) .. ": file exists")
|
||||
do
|
||||
local attr = attributes(normalizepath(dir))
|
||||
if attr then
|
||||
if attr.mode == 'directory' then
|
||||
return
|
||||
end
|
||||
error("Can't mkdirs " .. tostring(dir) .. ": file exists")
|
||||
end
|
||||
end
|
||||
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
|
||||
do
|
||||
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