diff options
| author | Shulhan <ms@kilabit.info> | 2021-08-11 13:59:10 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-08-11 13:59:10 +0700 |
| commit | 45485c7232e95acbe7b6ffbe31c9f40ca17ea774 (patch) | |
| tree | 625b088d4a8f3532310ab79c4d672956aa0da414 | |
| parent | 89e0c2140b26032b5d3d6e104f78137efb4c7677 (diff) | |
| download | awwan-45485c7232e95acbe7b6ffbe31c9f40ca17ea774.tar.xz | |
all: fix and update content of README
* The goreportcard badge does not work with git.sr.ht, so we remove it.
* Update the multi-line code syntax to use the asciidoc format.
* Update the #require: statement in the example
* Mention the alternative for using pipe in the statement.
| -rw-r--r-- | README.adoc | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/README.adoc b/README.adoc index f547d60..ab0442a 100644 --- a/README.adoc +++ b/README.adoc @@ -1,12 +1,11 @@ = awwan :author: Shulhan +:date: 11 August 2021 :email: <ms@kilabit.info> :toc: -:url-gocard: https://goreportcard.com/report/git.sr.ht/~shulhan/awwan :url-godoc: https://pkg.go.dev/git.sr.ht/~shulhan/awwan image:https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square[GoDoc, link={url-godoc}] -image:https://goreportcard.com/badge/git.sr.ht/~shulhan/awwan[Go Report Card, link={url-gocard}] == NAME @@ -60,21 +59,21 @@ line-start until the last line. Here is some examples of how to execute script, * Execute only line 5 of "script.aww" on local system, - ++ ---- $ awwan local myserver/script.aww 5 ---- * Execute line 5 until line 10 of "script.aww" on remote server known as "myserver", - ++ ---- $ awwan play myserver/script.aww 5 10 ---- * Execute line 5 until last line of "script.aww" on remote server known as "myserver", - ++ ---- $ awwan play cloud/myserver/script.aww 5 - ---- @@ -89,7 +88,7 @@ There are five magic words in the script: `#require:`, `#get:`, `#get!`, `#put:`, and `#put!`. Magic word `#require:` will ensure that the statement will always executed -when its skipped with start number. +even if its skipped by line-start number argument. For example, given following script with line number ---- @@ -260,7 +259,7 @@ that match with "development" in current ".ssh/config" or in "~/.ssh/config". == EXAMPLE -To give you the taste of the idea, I will show you an example using the +To give you the taste of the idea, we will show you an example using the working directory $WORKDIR as our base directory. Let say that we have the working remote server named "myserver" at IP address @@ -419,9 +418,8 @@ command that you run is using correct configuration. Here is the example of deploying Cloud Functions using local awwan script, -``` -1: #require: -2: gcloud config configurations activate {{.Val "gcloud::config"}} +---- +1: #require: gcloud config configurations activate {{.Val "gcloud::config"}} 3: 4: ## Create PubSub topic. 5: @@ -449,26 +447,27 @@ Here is the example of deploying Cloud Functions using local awwan script, 27: gcloud pubsub topics \ 28: publish {{.Val "CloudFunctions:log2slack:pubsub_topic"}} \ 29: --message='Hello World!' -``` +---- When executing statement at line number 6, 10, 16 or 27 we need to make sure that it always using the correct environment "gcloud::config", -``` +---- $ awwan local awwan/playground/CloudFunctions/log2slack/local.deploy.aww 27 -2020/06/04 01:48:38 >>> loading "/xxx//awwan.env" ... +2020/06/04 01:48:38 >>> loading "/xxx/awwan.env" ... 2020/06/04 01:48:38 >>> loading "/xxx/awwan/dev/awwan.env" ... 2020/06/04 01:48:38 --- require 2: gcloud config configurations activate dev Activated [dev]. 2020/06/04 01:48:38 >>> local 29: gcloud pubsub topics publish logs --message='Hello World!' -``` +---- == BUGS -Shell pipe "|", "<", or ">" does not work in the script, yet. +Shell pipe "|", "<", or ">" does not work in the script. +Use "sh -c 'cmd arguments'" if you need piping. == LINKS |
