Skip to content

Commit 9e7a7e6

Browse files
committed
added docs
1 parent 55c3766 commit 9e7a7e6

File tree

3 files changed

+48
-9
lines changed

3 files changed

+48
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.php_cs.cache
44
vendor/
55
kimai.phar
6+
kimai.phar.sha1

README.md

+46-9
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ A PHP application to access your Kimai 2 installation via its API (http).
1212

1313
## Installation
1414

15-
To install and update the Kimai console tools, execute the following commands:
15+
To install the Kimai console tools, execute the following commands:
1616

1717
```bash
1818
curl -LO https://github.com/kevinpapst/kimai2-console/releases/latest/download/kimai.phar
19+
curl -LO https://github.com/kevinpapst/kimai2-console/releases/latest/download/kimai.phar.sha1
20+
sha1sum --check kimai.phar.sha1
21+
rm kimai.phar.sha1
1922
chmod +x kimai.phar
2023
mv kimai.phar /usr/local/bin/kimai
2124
```
@@ -64,12 +67,6 @@ You get a list of all available commands with `kimai`.
6467
- `kimai version` - show the full version string of the remote installation
6568
- `kimai configuration` - creates the initial configuration file or displays it
6669

67-
The following commands will help you with updating the command:
68-
69-
- `kimai self:check` - check if there is a new version available
70-
- `kimai self:update` - update your local version to the latest release
71-
- `kimai self:rollback` - rollback to a previous release
72-
7370
To get help for a dedicated command use the `--help` switch, eg: `kimai project:list --help`
7471

7572
### Start a timesheet
@@ -121,9 +118,49 @@ The following environment variables are supported:
121118
- `KIMAI_MEMORY_LIMIT` - configures the allowed memory limit (eg `128MB`, or `-1` for unlimited) (see [here](https://www.php.net/manual/en/ini.core.php#ini.memory-limit))
122119
- `KIMAI_CONFIG` - path to your configuration file (defaults to: $HOME/.kimai2-console.json)
123120

124-
## How to build a release
121+
## FAQ
122+
123+
### Updating the Console tools
124+
125+
The following commands will help you with updating the Console tools:
126+
127+
- `kimai self:check` - check if there is a new version available
128+
- `kimai self:update` - update your local version to the latest release
129+
- `kimai self:rollback` - rollback to a previous release
130+
131+
There are security concerns with this approach, if you are cautious stick to the initial installation process.
132+
133+
The `update` command will create a copy beside the original executable (if you wondered what `kimai-old.phar` is: now you know!), which is used by the `rollback` command.
134+
135+
### Check the contents of the PHAR
136+
137+
There are several ways to see the contents of the PHAR, here are some:
138+
139+
```
140+
phar extract -f kimai.phar
141+
box info kimai.phar -l
142+
```
143+
144+
The PHAR contents are GZ compressed and verified with a SHA512 signature by the PHAR interpreter.
145+
146+
### Build from source
147+
148+
You need to have PHP cli installed with all required dependencies.
149+
The dependencies might differ from than the ones required for running the tools.
150+
Then install the [humbug/box](https://github.com/humbug/box) project,
151+
according to their [installation docs](https://github.com/humbug/box/blob/master/doc/installation.md#installation).
152+
153+
Now compiling the PHAR is simple as calling:
154+
155+
```bash
156+
box compile
157+
```
158+
159+
### Release on GitHub
125160

126161
- Bump version in `src/Constants.php`
127162
- Execute `box compile`
163+
- Execute `sha1sum kimai.phar > kimai.phar.sha1`
128164
- Prepare a new GitHub release
129-
- Upload the file `kimai.phar` to the new release
165+
- Upload the files `kimai.phar` and `kimai.phar.sha1` to the new release
166+
- Publish the release

box.json.dist

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
}
3030
],
3131
"compression": "GZ",
32+
"algorithm": "SHA512",
3233
"git-commit": "git-commit",
3334
"git-commit-short": "git-commit-short",
3435
"datetime": "release-date"

0 commit comments

Comments
 (0)