-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathcoho.lua
95 lines (92 loc) · 2.88 KB
/
coho.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
local parser = clink.arg.new_parser
local repos = {
-- repos names
-- platforms
"android", "ios", "blackberry", "windows", "wp8", "firefoxos", "osx","ubuntu",
"amazon-fireos", "bada", "bada-wac", "webos", "qt", "tizen",
-- plugins
"plugin-battery-status", "plugin-camera", "plugin-console", "plugin-contacts",
"plugin-device-motion", "plugin-device-orientation", "plugin-device",
"plugin-dialogs", "plugin-file-transfer", "plugin-file", "plugin-geolocation",
"plugin-globalization", "plugin-inappbrowser", "plugin-media",
"plugin-media-capture", "plugin-network-information", "plugin-splashscreen",
"plugin-vibration", "plugin-statusbar", "cordova-plugins",
--tools
"docs", "mobile-spec", "js","app-hello-world", "cli", "plugman", "lib", "common",
"coho", "medic", "app-harness", "labs", "registry-web", "registry",
"dist", "dist/dev", "private-pmc", "website",
--repos groups
"active-platform", "all", "auto", "cadence", "platform", "plugins",
"release-repos", "tools"
}
local coho_parser = parser(
{
"repo-clone" .. parser(
"-r" .. parser(repos),
"--repo" .. parser(repos),
"--chdir", "--no-chdir",
"--depth"
),
"repo-update" .. parser(
"--chdir", "--no-chdir",
"-b", "--branch",
"-r" .. parser(repos),
"--repo" .. parser(repos),
"--fetch",
"--depth",
"-h", "--help"
),
"repo-reset" .. parser(
"--chdir",
"-b", "--branch",
"-r" .. parser(repos),
"--repo" .. parser(repos),
"-h", "--help"
),
"repo-status" .. parser(
"--chdir",
"-b", "--branch",
"-r" .. parser(repos),
"--repo" .. parser(repos),
"--branch2",
"--diff",
"-h", "--help"
),
"repo-push",
"list-repos",
-- release management
"prepare-release-branch",
"tag-release",
"audit-license-headers",
"check-license",
"create-archive"..parser(
'-r'..parser(repos),
'--repo'..parser(repos),
'--dest'
),
"verify-archive",
"print-tags"..parser(
'-r'..parser(repos),
'--repo'..parser(repos),
'--tag' -- TODO: get tags based on dir and functionality from git.lua
),
"verify-tags",
"list-release-urls",
"nightly",
"npm-publish-tag",
"update-release-notes",
"npm-unpublish-nightly",
-- other commands
"list-pulls",
"last-week",
"shortlog",
"for-each",
"npm-link",
"create-pr",
"merge-pr"..parser("--pr")
},
"--chdir",
"--no-chdir",
"-h"
)
clink.arg.register_parser("coho", coho_parser)