Skip to content

Commit 732abdb

Browse files
committed
Added (terrible) script to publish to lit
1 parent 096312d commit 732abdb

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.DS_Store
22
luacov.report.out
33
luacov.stats.out
4+
build

publish-to-lit.lua

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
os.execute('mkdir -p build')
2+
3+
local f = io.open('build/mach.lua', 'w')
4+
5+
f:write([==[
6+
--[[lit-meta
7+
name = 'ryanplusplus/mach'
8+
version = '1.0.4'
9+
description = 'Simple mocking framework for Lua inspired by CppUMock and designed for readability.'
10+
tags = { 'testing' }
11+
license = 'MIT'
12+
author = { name = 'Ryan Hartlage' }
13+
homepage = 'https://github.com/ryanplusplus/mach.lua'
14+
]]
15+
]==])
16+
17+
f:close()
18+
19+
os.execute([[cd src; amalg.lua mach `find mach | grep lua | cut -d'.' -f1` >> ../build/mach.lua]])
20+
21+
f = io.open('build/mach.lua', 'r')
22+
local content = f:read('*all')
23+
f:close()
24+
25+
content = content:gsub("require 'mach.", "require 'mach/")
26+
27+
f = io.open('build/mach.lua', 'w')
28+
f:write(content .. "\nreturn require 'mach'")
29+
f:close()
30+
31+
os.execute([[lit publish build/mach.lua]])

0 commit comments

Comments
 (0)