Skip to content

Commit 5cdeaeb

Browse files
committed
release 1.1.0-1
1 parent 943a029 commit 5cdeaeb

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

luacov-console-1.1.0-1.rockspec

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package = "luacov-console"
2+
version = "1.1.0-1"
3+
source = {
4+
url = "git://github.com/spacewander/luacov-console",
5+
tag = "1.1",
6+
}
7+
description = {
8+
summary = "Combine luacov with your development cycle and CI",
9+
detailed = "Combine luacov with your development cycle and CI",
10+
homepage = "https://github.com/spacewander/luacov-console",
11+
license = "MIT"
12+
}
13+
dependencies = {
14+
"lua >= 5.1",
15+
"luacov > 0.5",
16+
"luafilesystem",
17+
"argparse",
18+
}
19+
build = {
20+
type = "builtin",
21+
-- I hope it's simple enough to use without any docs
22+
copy_directories = {},
23+
modules = {
24+
['luacov.reporter.console'] = "src/luacov/reporter/console.lua",
25+
},
26+
install = {
27+
bin = {
28+
["luacov-console"] = "src/luacov-console.lua",
29+
}
30+
},
31+
}

src/luacov-console.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ local reporter = require("luacov.reporter.console")
66
local argparse = require("argparse")
77
local lfs = require('lfs')
88

9+
local VERSION = "1.1.0"
10+
911
-- Use ANSI escape sequences.
1012
-- https://en.wikipedia.org/wiki/ANSI_escape_code
1113
-- The Win32 console did not support ANSI escape sequences at all until Windows 10.
@@ -164,6 +166,7 @@ end
164166
local parser = argparse("luacov-console",
165167
"Combine luacov with your development cycle and CI")
166168
parser:argument("workdir", "Specific the source directory", '.')
169+
parser:option("--version", "Print version"):args(0)
167170
parser:option("--no-colored", "Don't print with color."):args(0)
168171
parser:option("-l --list", "List coverage results of files matched given lua pattern(s)."):args('+')
169172
parser:option("-s --summary", "Show coverage summary."):args(0)
@@ -174,6 +177,8 @@ if args.list then
174177
print_results(args.list, args.no_colored)
175178
elseif args.summary then
176179
print_summary(args.no_colored)
180+
elseif args.version then
181+
print(VERSION)
177182
else
178183
reporter.report(args)
179184
end

0 commit comments

Comments
 (0)