refactor: move git-sha flag to git:report
This commit is contained in:
@@ -45,6 +45,11 @@ Dokku will no longer distribute packages for Debian versions that are not `stabl
|
|||||||
- Debian 7 (wheezy)
|
- Debian 7 (wheezy)
|
||||||
- Debian 8 (jessie)
|
- Debian 8 (jessie)
|
||||||
|
|
||||||
|
### App report flags
|
||||||
|
|
||||||
|
The following changes on the `apps:report` command were made in this release
|
||||||
|
|
||||||
|
- The `--git-sha` flag was moved from the `apps:report` command to the `git:report` command.
|
||||||
## Deprecations
|
## Deprecations
|
||||||
|
|
||||||
- `nginx:show-conf` has been deprecated in favor of `nginx:show-config`.
|
- `nginx:show-conf` has been deprecated in favor of `nginx:show-config`.
|
||||||
|
|||||||
@@ -236,16 +236,14 @@ dokku apps:report
|
|||||||
```
|
```
|
||||||
=====> node-js-app
|
=====> node-js-app
|
||||||
App dir: /home/dokku/node-js-app
|
App dir: /home/dokku/node-js-app
|
||||||
Git sha: dbddc3f
|
App deploy source: git
|
||||||
Deploy source: git
|
App locked: false
|
||||||
Locked: false
|
|
||||||
=====> python-sample
|
=====> python-sample
|
||||||
not deployed
|
not deployed
|
||||||
=====> ruby-sample
|
=====> ruby-sample
|
||||||
App dir: /home/dokku/ruby-sample
|
App dir: /home/dokku/ruby-sample
|
||||||
Git sha: a2d477c
|
App deploy source: git
|
||||||
Deploy source: git
|
App locked: false
|
||||||
Locked: false
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can run the command for a specific app also.
|
You can run the command for a specific app also.
|
||||||
@@ -257,13 +255,12 @@ dokku apps:report node-js-app
|
|||||||
```
|
```
|
||||||
=====> node-js-app
|
=====> node-js-app
|
||||||
App dir: /home/dokku/node-js-app
|
App dir: /home/dokku/node-js-app
|
||||||
Git sha: dbddc3f
|
App deploy source: git
|
||||||
Deploy source: git
|
App locked: false
|
||||||
Locked: false
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can pass flags which will output only the value of the specific information you want. For example:
|
You can pass flags which will output only the value of the specific information you want. For example:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku apps:report node-js-app --git-sha
|
dokku apps:report node-js-app --app-dir
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ cmd-git-report() {
|
|||||||
|
|
||||||
cmd-git-report-single() {
|
cmd-git-report-single() {
|
||||||
declare APP="$1" INFO_FLAG="$2"
|
declare APP="$1" INFO_FLAG="$2"
|
||||||
|
local APP_DIR="$DOKKU_ROOT/$APP"
|
||||||
if [[ "$INFO_FLAG" == "true" ]]; then
|
if [[ "$INFO_FLAG" == "true" ]]; then
|
||||||
INFO_FLAG=""
|
INFO_FLAG=""
|
||||||
fi
|
fi
|
||||||
@@ -40,6 +41,7 @@ cmd-git-report-single() {
|
|||||||
"--git-global-deploy-branch: $(fn-plugin-property-get "git" "--global" "deploy-branch" "master")"
|
"--git-global-deploy-branch: $(fn-plugin-property-get "git" "--global" "deploy-branch" "master")"
|
||||||
"--git-keep-git-dir: $(fn-plugin-property-get "git" "$APP" "keep-git-dir" "false")"
|
"--git-keep-git-dir: $(fn-plugin-property-get "git" "$APP" "keep-git-dir" "false")"
|
||||||
"--git-rev-env-var: $(fn-plugin-property-get "git" "$APP" "rev-env-var" "GIT_REV")"
|
"--git-rev-env-var: $(fn-plugin-property-get "git" "$APP" "rev-env-var" "GIT_REV")"
|
||||||
|
"--git-sha: $(GIT_DIR="$APP_DIR" git rev-parse --short HEAD 2>/dev/null || false)"
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ -z "$INFO_FLAG" ]]; then
|
if [[ -z "$INFO_FLAG" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user