Skip to content

Commit

Permalink
improve documentation, update changelog for v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihpense committed Mar 11, 2021
1 parent d2cc4fa commit ccdc0f5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.2.1] - 2021-03-12

- Fix: reported path issues
- Add: `prop_comment_removal` option to remove auto-generated timestamp comments in `parameters.prop`
- Add: Remove local package content before sync
- Add: musl libc binary for Alpine docker images

## [0.2.0] - 2021-02-06

- Config change: change package rules, add regex, include/exclude operation
Expand Down
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ It has two main configurations that are documented below:

1. Download it from GitHub releases.
2. Create an empty directory, and put `cpisync.exe` inside the directory
3. Just copy the example config below, change the fields. Using the JSON create `cpi-config.json` file inside the same directory.
3. Just copy the example config below, change the fields. Using the JSON create `cpi-sync.json` file inside the same directory.
4. You can double-click on `cpisync.exe` and it will ask for the password while running.
1. Alternative: You can start `cmd` or PowerShell, set the environment variable `CPI_PASSWORD` and then `cpisync`
1. For Windows cmd.exe: `set CPI_PASSWORD=yourpass`
2. For Windows Powershell: `$env:CPI_PASSWORD="yourpass"`
2. For Windows Powershell: `` $env:CPI_PASSWORD="your`$pass" `` (You can escape special characters with backtick "`" character)
3. For Linux: `export CPI_PASSWORD=yourpass`
2. Alternative: See "Recommended Credentials: OAuth"

Expand Down Expand Up @@ -77,6 +77,18 @@ Create an OAuth client for your tenant. Use `oauth_client_credentials` object un
}
```

## Using with Git

`prop_comment_removal` option can be useful to have a clear Git history. `parameters.prop` files contain automatically generated timestamps in a comment, even if no development made for the flow.

```json
{
"packages": {
"prop_comment_removal": "enabled"
}
}
```

## Updates

When you download a new version of the tool. Schema version will be updated and you may need to change version like `"cpisync": "0.2.0"` , preferably after checking the documentation!
Expand All @@ -102,6 +114,15 @@ OPTIONS:

### JSON Config File Reference

| Options for Packages Object | Default | Description |
| --------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| zip_extraction | enabled | Extract artifact contents, this is useful for Git usage. If you prefer to keep artifacts as .zip files for backup, disable this option. |
| local_dir | "" | Directory to download artifacts, relative to the config file. By default it is the same as config file directory. |
| prop_comment_removal | disabled | Removes auto-generated timestamp comments in `parameters.prop`. Useful for keeping Git history clean. Only works when zip_extraction is enabled. It is disabled by default since it changes content. |
| filter_rules | - | Filter rules to select packages for sync. It can contain simple package id or regex rules. |

Config file version can be older than tool version(Currently `0.2.0`), this is to prevent unnecessary changes if there are no breaking changes to the config structure.

You can inspect `config.schema.json` under `resources`. You can use a tool like ["JSON Schema Faker"](https://json-schema-faker.js.org/) to get more ideas about your options. Just paste the schema and click generate a few times!

You can also use ["JSON Schema Validator"](https://www.jsonschemavalidator.net/) if you get too many errors on your config file.
You can also use ["JSON Schema Validator draft-07"](https://jsonschemalint.com/#!/version/draft-07/markup/json) if you get too many errors on your config file.

0 comments on commit ccdc0f5

Please sign in to comment.