summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-01-18 10:40:18 -0800
committerSteve Manuel <nilslice@gmail.com>2017-01-18 10:40:18 -0800
commit3f0498f97080067d3edc4d827a117222f617cebd (patch)
tree972bdcbd21e7f1cd7b191944964dbd0ebd7ad6bd
parentdcd03cf8537f2f167fff5ef5640257dc65a9cfa3 (diff)
updating docs and readme
-rw-r--r--README.md20
-rw-r--r--cmd/ponzu/options.go26
-rw-r--r--cmd/ponzu/usage.go28
3 files changed, 27 insertions, 47 deletions
diff --git a/README.md b/README.md
index 5d4dac8..a5c3c81 100644
--- a/README.md
+++ b/README.md
@@ -119,13 +119,13 @@ the necessary files from your workspace into the vendored directory, and
will build/compile the project to then be run.
Optional flags:
-- `--gocmd` sets the binary used when executing `go build` within `ponzu` build step
+- `-gocmd` sets the binary used when executing `go build` within `ponzu` build step
Example:
```bash
$ ponzu build
(or)
-$ ponzu --gocmd=go1.8beta2 build # useful for testing
+$ ponzu -gocmd=go1.8rc1 build # useful for testing
```
Errors will be reported, but successful build commands return nothing.
@@ -141,8 +141,8 @@ if the server should utilize TLS encryption - served over HTTPS, which is
automatically managed using Let's Encrypt (https://letsencrypt.org)
Optional flags:
-- `--port` sets the port on which the server listens for HTTP requests [defaults to 8080]
-- `--httpsport` sets the port on which the server listens for HTTPS requests [defaults to 443]
+- `-port` sets the port on which the server listens for HTTP requests [defaults to 8080]
+- `-httpsport` sets the port on which the server listens for HTTPS requests [defaults to 443]
- `--https` enables auto HTTPS management via Let's Encrypt (port is always 443)
- `--devhttps` generates self-signed SSL certificates for development-only (port is 10443)
@@ -150,15 +150,15 @@ Example:
```bash
$ ponzu run
(or)
-$ ponzu --port=8080 --https run admin,api
+$ ponzu -port=8080 --https run admin,api
(or)
$ ponzu run admin
(or)
-$ ponzu --port=8888 run api
+$ ponzu -port=8888 run api
(or)
$ ponzu --devhttps run
```
-Defaults to `$ ponzu --port=8080 run admin,api` (running Admin & API on port 8080, without TLS)
+Defaults to `$ ponzu -port=8080 run admin,api` (running Admin & API on port 8080, without TLS)
*Note:*
Admin and API cannot run on separate processes unless you use a copy of the
@@ -189,7 +189,7 @@ Prints the version of the Ponzu CLI you have installed.
Example:
```bash
$ ponzu version
-> Ponzu v0.70
+> Ponzu v0.7.0
```
---
@@ -236,14 +236,14 @@ $ git push origin ponzu-dev
```
**Note:** if you intend to work on your own fork and contribute from it, you will
-need to also pass `--fork=path/to/your/fork` (using OS-standard filepath structure),
+need to also pass `-fork=path/to/your/fork` (using OS-standard filepath structure),
where `path/to/your/fork` _must_ be within `$GOPATH/src`, and you are working from a branch
called `ponzu-dev`.
For example:
```bash
# ($GOPATH/src is implied in the fork path, do not add it yourself)
-$ ponzu --dev --fork=github.com/nilslice/ponzu new /path/to/new/project
+$ ponzu --dev -fork=github.com/nilslice/ponzu new /path/to/new/project
```
diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go
index d71d362..43f6e05 100644
--- a/cmd/ponzu/options.go
+++ b/cmd/ponzu/options.go
@@ -435,22 +435,6 @@ func upgradePonzuProjectDir(path string) error {
}
}
- err = os.Chdir(temp)
- if err != nil {
- fmt.Println("Coudln't change directory to:", temp)
- }
-
- // re-create the project dir
- err = os.MkdirAll(path, os.ModeDir|os.ModePerm)
- if err != nil {
- return err
- }
-
- err = os.Chdir(path)
- if err != nil {
- return err
- }
-
err = createProjectInDir(path)
if err != nil {
fmt.Println("")
@@ -483,16 +467,6 @@ func upgradePonzuProjectDir(path string) error {
fmt.Println(" [+]", r.Name())
}
- // refresh dir to show files after restoring
- err = os.Chdir(temp)
- if err != nil {
- return err
- }
- err = os.Chdir(path)
- if err != nil {
- return err
- }
-
// clean-up
backups := []string{filepath.Join(path, stamp), temp}
for _, bak := range backups {
diff --git a/cmd/ponzu/usage.go b/cmd/ponzu/usage.go
index 6787ca1..c53ade9 100644
--- a/cmd/ponzu/usage.go
+++ b/cmd/ponzu/usage.go
@@ -16,17 +16,17 @@ $ ponzu [flags] command <params>
Ponzu is a powerful and efficient open-source HTTP server framework and CMS. It
provides automatic, free, and secure HTTP/2 over TLS (certificates obtained via
[Let's Encrypt](https://letsencrypt.org)), a useful CMS and scaffolding to
-generate content editors, and a fast HTTP API on which to build modern applications.
+generate set-up code, and a fast HTTP API on which to build modern applications.
Ponzu is released under the BSD-3-Clause license (see LICENSE).
-(c) ` + year + ` Boss Sauce Creative, LLC
+(c) 2016 - ` + year + ` Boss Sauce Creative, LLC
-COMMANDS
+COMMANDS:
`
var usageHelp = `
-help, h (command):
+help, h (command)
Help command will print the usage for Ponzu, or if a command is entered, it
will show only the usage for that specific command.
@@ -38,7 +38,7 @@ help, h (command):
`
var usageNew = `
-new <directory>:
+new <directory>
Creates a 'ponzu' directory, or one by the name supplied as a parameter
immediately following the 'new' option in the $GOPATH/src directory. Note:
@@ -57,7 +57,7 @@ new <directory>:
`
var usageGenerate = `
-generate, gen, g <generator type (,...fields)>:
+generate, gen, g <generator type (,...fields)>
Generate boilerplate code for various Ponzu components, such as 'content'.
@@ -83,7 +83,7 @@ generate, gen, g <generator type (,...fields)>:
`
var usageBuild = `
-build
+[-gocmd=go] build
From within your Ponzu project directory, running build will copy and move
the necessary files from your workspace into the vendored directory, and
@@ -91,13 +91,19 @@ build
Example:
$ ponzu build
+ (or)
+ $ ponzu -gocmd=go1.8rc1 build
+
+ By providing the 'gocmd' flag, you can specify which Go command to build the
+ project, if testing a different release of Go.
Errors will be reported, but successful build commands return nothing.
+
`
var usageRun = `
-[[--port=8080] [--https]] run <service(,service)>:
+[[-port=8080] [--https|--devhttps]] run <service(,service)>
Starts the 'ponzu' HTTP server for the JSON API, Admin System, or both.
The segments, separated by a comma, describe which services to start, either
@@ -108,13 +114,13 @@ var usageRun = `
Example:
$ ponzu run
(or)
- $ ponzu --port=8080 --https run admin,api
+ $ ponzu -port=8080 --https run admin,api
(or)
$ ponzu run admin
(or)
- $ ponzu --port=8888 run api
+ $ ponzu -port=8888 run api
- Defaults to '--port=8080 run admin,api' (running Admin & API on port 8080, without TLS)
+ Defaults to '-port=8080 run admin,api' (running Admin & API on port 8080, without TLS)
Note:
Admin and API cannot run on separate processes unless you use a copy of the