faf-tool
Version:
Tool for maintain FAF modules
225 lines (140 loc) • 3.96 kB
Markdown
Command line utility which helps in setting up faf project
1. [Install](
1. [Basic Usage](
1. [Commands](
1. [CLI Options](
1. [Settings File](
```bash
npm install -g faf-tool
```
```bash
mkdir diamond-feature
cd diamond-feature
faf-tool
```
running faf-tool without command shows help and copy `settings.json.example` to current folder
rename `settings.json.example` to `settings.json` and edit it, for example:
```javascript
{
"svn-server": "svnserver.jaspersoft.com",
"release-cycle": "diamond",
"feature-name": "feature",
"jasperserver-branch": "diamond-ce-feature",
"jasperserver-pro-branch": "diamond-pro-feature",
"modules": [
"bi-charts",
"bi-dashboard",
"bi-report",
"bi-repository",
"js-sdk",
"jrs-ui",
"jrs-ui-pro"
]
}
```
Prepare local project to work
```bash
faf-tool setup
```
**[⬆ back to top](
Checkout selected modules and run *npm* init
```bash
faf-tool setup
```
Initialize for each module: npm install && npm prune && grunt init
```bash
faf-tool init
```
Start watchers assets like js,hml,css etc in all faf packages
```bash
faf-tool watch
```
> To find out local deployment you have to prepare .workspace file
Update and initialize for each module: svn up && npm install && npm prune && grunt init
```bash
faf-tool update-init
```
Checking out faf modules and jrs if specified
```bash
faf-tool create-feature
```
Switch repository to specified branch
```bash
faf-tool switch
```
Runs svn up and svn merge from trunk command for FAF modules and JRS
Accepts "--accept=<value>" svn argument. Default "postpone".
Accepts "--separate-changelist=<true|false>" svn argument. Default "true".
```bash
faf-tool downmerge
```
removes all changelists which was created during downmerge task
executed with --separate-changelist=true wich is set by default
```bash
faf-tool removecl
```
runs svn cleanup for each module
```bash
faf-tool cleanup
```
**[⬆ back to top](
- `--dry-run=true`
- `--verbose`
- `--no-time` - hide time report
- `--username=<username>` - svn username
- `--password=<password>` - svn password
- `--accept=<value>` - argument for svn merge command, works for "downmerge" task. Default "postpone".
- `--parallel=<true|false>` - argument for parallel command execution, works for most tasks which use svn. Default "true".
- `--separate-changelist=<true|false>` - argument for adding module changes to a separate svn changelist, works for "downmerge" task. Default "true"
```bash
faf-tool create-feature --dry-run
```
**[⬆ back to top](
Look at [settings.json samples](https://github.com/Jaspersoft/faf-tool/tree/master/samples)
```javascript
{
// by default it uses "https://" protocol
"svn-server": "svnserver.jaspersoft.com",
// branch name parts
//name of the feature branch or "trunk"
"feature-name": "<feature name>",
// optional parameter for features without release cycle like bugfix
"release-cycle": "<release name>",
// optional JRS branches names used for checkout JRS
"jasperserver-branch": "<existing jrs ce branch name>",
"jasperserver-pro-branch": "<existing jrs pro branch name>",
// optional JRS location
"jasperserver-ci-path": "<path to ci jrs>",
"jasperserver-pro-ci-path": "<path to ci jrs-pro>",
// optional svn credentials
"username": "username",
"password":"password",
"modules": [
"bi-charts",
"bi-dashboard",
"bi-report",
"bi-repository",
"js-sdk",
"jrs-ui",
"jrs-ui-pro"
]
}
```
**[⬆ back to top](