-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add reworked configuration docs. #245
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
Files are placed in the `.mainframer` directory. | ||
The final configuration is the combination of files placed in: | ||
|
||
* `${HOME}/.config/mainframer` or | ||
[`${XDG_CONFIG_HOME}`](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) | ||
if available — the global configuration; | ||
* `.mainframer` — the project configuration. | ||
|
||
It is posssible to declare common configuration using the global one | ||
and fine-tune it using the project one. | ||
|
||
## `.mainframer` | ||
|
||
The directory contains following files. | ||
|
||
Name | Required | Keep in VCS | Description | ||
-------------|----------|-------------|------------ | ||
`config.yml` | Yes | No | Configuration options. | ||
`ignore.yml` | No | Yes | Ignore rules for copying files. | ||
|
||
## `.mainframer/config.yml` | ||
|
||
```yaml | ||
remote: | ||
name: "{SSH machine name}" | ||
push: | ||
compression: {level} | ||
pull: | ||
compression: {level} | ||
``` | ||
|
||
Name | Required | Value | Default | Description | ||
-------------------|----------|---------|---------|------------------ | ||
`remote.name` | Yes | `string`| — | Remote machine name from SSH config or hostname / IP address. | ||
`push.compression` | No | `0..9` | `0` | Compression level used to copy files from local machine to remote one. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. default is 3 |
||
`pull.compression` | No | `0..9` | `0` | Compression level used to copy files from remote machine to local one. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. default is 1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these our values? Do you have a reference otherwise? I’ve found an outdated email. The source code says otherwise — seems to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MF There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's in 3.x PR #239, idea is that usually you push text files which are very compressible and pull binaries which are barely compressible, thus push There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can update this doc in #239, going to merge your PR now |
||
|
||
Compression level is inherited from underlying `rsync` | ||
which uses [`zlib` values](https://www.zlib.net/manual.html): | ||
|
||
> The compression level must be between `0` and `9`: | ||
> `1` gives best speed, `9` gives best compression, `0` gives no compression at all | ||
> (the input data is simply copied a block at a time). | ||
|
||
## `.mainframer/ignore.yml` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This section misses description There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Files are described in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I guess I just wanted to see description there, ok let's go without it for now then |
||
|
||
```yaml | ||
push: | ||
- "pattern" | ||
- "..." | ||
pull: | ||
- "pattern" | ||
- "..." | ||
both: | ||
- "pattern" | ||
- "..." | ||
``` | ||
|
||
Name | Description | Suggestions | ||
-------|---------------------------------------------------------------|------------ | ||
`push` | Patterns used to copy files from local machine to remote one. | Build results. | ||
`pull` | Patterns used to copy files from remote machine to local one. | Source code. | ||
`both` | Patterns used to copy files both ways. | VCS, IDE-related directories. | ||
|
||
Ignore patterns are inherited from underlying `rsync`. | ||
Please refer to [`rsync` documentation](https://download.samba.org/pub/rsync/rsync.html) — | ||
see the _Include/Exclude Pattern Rules_ section. | ||
The format is very similar to `.gitignore`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is overlapped with next paragraph and also is incorrect in case of
${HOME}/.config/mainframer