README.md in git-semaphore-1.1.0 vs README.md in git-semaphore-1.2.0

- old
+ new

@@ -42,11 +42,11 @@ | [projects][] | ✅ | `git semaphore --projects` | list all projects and their current status | | [project branches][] | ✅ | `git semaphore --branches` | list all branches for the current project | | [branch status][] | ✅ | `git semaphore --status` | list the build status for the current branch | | [branch history][] | ✅ | `git semaphore --history` | list the build history for the current branch | | [build information][] | ✅ | `git semaphore --information` | detailed information for a given build number _(ie. all commits)_ | -| [build log][] | ❌ | | execution logs for a given build number _(per thread and command)_ | +| [build log][] | ✅ | `git semaphore --log` | execution logs for a given build number _(per thread and command)_ | | [rebuild][] | ✅ | `git semaphore --rebuild` | rebuild last revision for the current branch | | [launch build][] | ❌ | | launch a build for the given commit SHA | | [stop][] | ❌ | | stop an in-progress build | | [deploy][] | ❌ | | run a deploy from a given build | @@ -176,10 +176,14 @@ git semaphore --information _(the project and branch names are derived from the current git repository and the current git head)_ +### build command and logs for the last build of a project's branch + + git semaphore --log + ## Formatting the raw `git semaphore` JSON output After installing [the indispensable jq utility][jq] (`brew install jq`), the raw JSON output generated by the various `git semaphore` commands can be formatted and queried as follows: # pretty-print the git semaphore settings @@ -191,12 +195,15 @@ # get the status of the last build for the current branch git semaphore --status | jq -r '.result' # list the build duration (in minutes) for all "passed" builds of the current branch git semaphore --history | jq -r '.builds | .[] | select(.result == "passed") | (.build_number|tostring) + "\t" + (.duration.minutes|tostring)' - + # list all commit SHAs that triggered the latest build git semaphore --information | jq -r '.commits | .[] | .id' + + # list the various thread commands for the latest build + git semaphore --log | jq '.threads | .[] | .commands | .[] | .name' [semaphoreci.com]: https://semaphoreci.com/ [account settings]: https://semaphoreci.com/users/edit [Semaphore API]: https://semaphoreci.com/docs/api.html