parent
e58ad10604
commit
13afbeebd2
3 changed files with 42 additions and 0 deletions
@ -0,0 +1,18 @@ |
||||
sudo: false |
||||
language: C |
||||
os: |
||||
- linux |
||||
- osx |
||||
compiler: |
||||
- gcc |
||||
- clang |
||||
|
||||
install: |
||||
- git clone --branch=repo https://github.com/xmake-io/xmake.git tboox/xmake --depth 1 |
||||
- cd ./tboox/xmake |
||||
- ./scripts/get.sh __local__ |
||||
- cd - |
||||
|
||||
script: |
||||
- xmake l ./scripts/test.lua |
||||
|
@ -0,0 +1,23 @@ |
||||
function main(...) |
||||
local packages = {...} |
||||
if #packages == 0 then |
||||
local files = os.iorun("git diff --name-only HEAD^") |
||||
for _, file in ipairs(files:split('\n'), string.trim) do |
||||
if file:find("packages", 1, true) and path.filename(file) == "xmake.lua" then |
||||
local package = path.filename(path.directory(file)) |
||||
table.insert(packages, package) |
||||
end |
||||
end |
||||
table.insert(packages, "tbox") |
||||
end |
||||
if #packages > 0 then |
||||
local workdir = path.join(os.tmpdir(), "xmake-repo") |
||||
print(packages) |
||||
os.tryrm(workdir) |
||||
os.mkdir(workdir) |
||||
os.cd(workdir) |
||||
os.exec("xmake create test") |
||||
os.cd("test") |
||||
os.exec("xmake require -f -v -y %s", table.concat(packages, " ")) |
||||
end |
||||
end |
Loading…
Reference in new issue