updated v1.5.0

This commit is contained in:
asoseil 2017-10-16 22:37:50 +02:00
parent 441efbf9ba
commit ef799f7ae7

141
README.md
View File

@ -54,13 +54,13 @@ Various operations can be programmed for each project, which can be executed at
Next features and informations Next features and informations
- [ ] Use cases - [ ] More use cases
- [ ] Tests - [ ] Complete tests
- [ ] Watch gopath dependencies - [ ] Watch gopath dependencies
- [ ] Web panel, download logs - [ ] Web panel, download logs
- [ ] Multiple configurations (dev, production) - [ ] Multiple configurations (dev, production)
- [ ] Support to ignore paths and files in gititnore - [ ] Support to ignore paths and files in gititnore
- [ ] Input redirection (wait for an input and redirect) - [ ] Input redirection (wait for an input and redirect) useful for cli scripts
#### Installation #### Installation
Run this to get/install: Run this to get/install:
@ -72,12 +72,12 @@ $ go get github.com/tockins/realize
- ##### Run - ##### Run
From project/projects root execute: From project/projects root execute:
``` ```
$ realize run $ realize start
``` ```
It will create a realize.yaml file if it doesn't exist already, add the working directory as project and run the pipeline. It will create a realize.yaml file if it doesn't exist already, add the working directory as project and run your workflow.
The Run command supports the following custom parameters: "Start" command supports the following custom parameters:
``` ```
--name="name" -> Run by name on existing configuration --name="name" -> Run by name on existing configuration
@ -85,38 +85,38 @@ $ go get github.com/tockins/realize
--generate -> Enable go generate --generate -> Enable go generate
--fmt -> Enable go fmt --fmt -> Enable go fmt
--test -> Enable go test --test -> Enable go test
--vet -> Enable go vet
--install -> Enable go install --install -> Enable go install
--build -> Enable go build --build -> Enable go build
--run -> Enable go run --run -> Enable go run
--server -> Enable the web server --server -> Enable the web server
--legacy -> Enable legacy watch instead of Fsnotify watch
--no-config -> Ignore an existing config / skip the creation of a new one --no-config -> Ignore an existing config / skip the creation of a new one
``` ```
Examples: Examples:
``` ```
$ realize run $ realize start
$ realize run --path="mypath" $ realize start --path="mypath"
$ realize run --name="My Project" --build $ realize start --name="realize" --build
$ realize run --path="realize" --run --no-config $ realize start --path="realize" --run --no-config
$ realize run --install --test --fmt --no-config $ realize start --install --test --fmt --no-config
$ realize run --path="/Users/alessio/go/src/github.com/tockins/realize-examples/coin/" $ realize start --path="/Users/alessio/go/src/github.com/tockins/realize-examples/coin/"
``` ```
If you want, you can specify additional arguments for your project. If you want, you can specify additional arguments for your project.
**The additional arguments must go after the params** **The additional arguments must go after the params**
**Run command can start a project from its working directory without make a config file (--no-config).** **Start command can be used with a project from its working directory without make a config file (--no-config).**
``` ```
$ realize run --path="/print/printer" --no-run yourParams --yourFlags // right $ realize start --path="/print/printer" --run yourParams --yourFlags // right
$ realize run yourParams --yourFlags --path="/print/printer" --no-run // wrong $ realize start yourParams --yourFlags --path="/print/printer" --run // wrong
``` ```
- ##### Add - ##### Add
Add a project to an existing config file or create a new one without run the pipeline. Add a project to an existing config file or create a new one.
"Add" supports the same parameters of the "Run" command. "Add" supports the same parameters of "Start" command.
``` ```
$ realize add $ realize add
@ -125,7 +125,7 @@ $ go get github.com/tockins/realize
- ##### Init - ##### Init
Like add, but with this command you can create a configuration step by step and customize each option. Like add, but with this command you can create a configuration step by step and customize each option.
**Init is the only command that supports a complete customization of all the options supported** **Init is the only command that supports a complete customization of all supported options**
``` ```
$ realize init $ realize init
@ -137,12 +137,6 @@ $ go get github.com/tockins/realize
$ realize remove --name="myname" $ realize remove --name="myname"
``` ```
- ##### List
Projects list in cli
```
$ realize list
```
- #### Color reference - #### Color reference
- Blue: outputs of the project - Blue: outputs of the project
- Red: errors - Red: errors
@ -156,59 +150,66 @@ $ go get github.com/tockins/realize
``` ```
settings: settings:
legacy: legacy:
status: true // enable polling watcher instead fsnotifiy force: true // force polling watcher instead fsnotifiy
interval: 10s // polling interval interval: 100ms // polling interval
resources: // files names resources: // files names
outputs: outputs.log outputs: outputs.log
logs: logs.log logs: logs.log
errors: errors.log errors: errors.log
server: server:
status: false // server status status: false // server status
open: false // open browser at start open: false // open browser at start
host: localhost // server host host: localhost // server host
port: 5001 // server port port: 5001 // server port
projects: schema:
- name: coin - name: coin
path: coin // project path path: coin // project path
environment: // env variables available at startup environment: // env variables available at startup
test: test test: test
myvar: value myvar: value
commands: // go commands supported commands: // go commands supported
vet: true vet:
fmt: true status: true
test: false fmt:
generate: false status: true
bin: args:
status: true - -s
- -w
test:
status: true
method: gb test // support differents build tool
generate:
status: true
install:
status: true
build: build:
status: false status: false
args: // additional params for the command method: gb build // support differents build tool
args: // additional params for the command
- -race - -race
run: true run: true
args: // arguments to pass at the project args: // arguments to pass at the project
- --myarg - --myarg
watcher: watcher:
preview: false // watched files preview preview: false // watched files preview
paths: // watched paths paths: // watched paths
- / - /
ignore_paths: // ignored paths ignore_paths: // ignored paths
- vendor - vendor
exts: // watched extensions extensions: // watched extensions
- .go - go
scripts: // custom scripts - html
- type: before // type (after/before) scripts: // custom scripts
command: ./ls -l // command - type: before // type (after/before)
changed: true // relaunch when a file change command: ./ls -l // command
startup: true // launch at start changed: true // relaunch when a file change
- type: after startup: true // launch at start
command: ./ls - type: after
changed: true command: ./ls
streams: // save logs/errors/outputs on files changed: true
file_out: false errorOutputPattern: mypattern //custom error pattern
file_log: false ```
file_err: false
```
#### Support us and suggest an improvement #### Support us and suggest an improvement
- Chat with us [Gitter](https://gitter.im/tockins/realize) - Chat with us [Gitter](https://gitter.im/tockins/realize)