summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-18 19:19:30 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-18 19:19:30 +0100
commit03608745813d4bff88d691a08693251cd9881575 (patch)
tree451132463915e5b017a2b259c07d2433f7111799
parent26d7f63d552dad222b6509a61750b23c43eee332 (diff)
downloadick2-03608745813d4bff88d691a08693251cd9881575.tar.gz
Add: rudimentary icktool manpage
-rw-r--r--icktool.1.in43
-rw-r--r--setup.py23
2 files changed, 66 insertions, 0 deletions
diff --git a/icktool.1.in b/icktool.1.in
new file mode 100644
index 0000000..e8cc1f5
--- /dev/null
+++ b/icktool.1.in
@@ -0,0 +1,43 @@
+.\" Copyright 2017 Lars Wirzenius
+.\"
+.\" This program is free software: you can redistribute it and/or modify
+.\" it under the terms of the GNU Affero General Public License as published by
+.\" the Free Software Foundation, either version 3 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" This program is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU Affero General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU Affero General Public License
+.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
+.TH ICKTOOL 1
+.SH NAME
+icktool \- use the Ick2 controller API
+.SH SYNOPSIS
+.SH DESCRIPTION
+.B icktool
+makes calls to the RESTful HTTP JSON API that the Ick2 controller
+provides.
+Ick2 is a continuous integration system.
+The
+.B icktool
+command line syntax consists of a
+.I command
+possibly followed by arguments.
+.PP
+The commands are listed with the
+.B help
+subcommand.
+Many commands read a project or worker description,
+which is JSON format,
+and will be documented when it stabilises.
+Ick2 is currently under heavy developemnt.
+.SH OPTIONS
+.SH FILES
+Run
+.B icktool
+with the option
+.B \-\-list\-configs
+for a list of all configuruation files it looks for.
diff --git a/setup.py b/setup.py
index 7b0b30e..e39e5c7 100644
--- a/setup.py
+++ b/setup.py
@@ -15,9 +15,29 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from distutils.core import setup
+from distutils.command.build import build
+
+import cliapp
import ick2
+class Build(build):
+
+ def run(self):
+ super().run()
+ self.build_manpage('icktool')
+
+ def build_manpage(self, program):
+ source = '{}.1.in'.format(program)
+ filename = '{}.1'.format(program)
+ argv = [
+ './{}'.format(program),
+ '--generate-manpage={}'.format(source),
+ ]
+ with open(filename, 'w') as manpage:
+ cliapp.runcmd(argv, stdout=manpage)
+
+
setup(
name='ick2',
version=ick2.__version__,
@@ -29,4 +49,7 @@ setup(
packages=['ick2'],
scripts=['create-token', 'start_ick', 'icktool', 'worker_manager'],
data_files=[],
+ cmdclass={
+ 'build': Build,
+ }
)