From 69377243701b705787e7fa00f75fbf1c0a63fbdb Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 5 Jul 2020 20:32:32 +0700 Subject: Release awwan 0.2.0 (2020.07.05) === New features * environment: export the SSH key, user, host, and port By knowing this values, user can use it to invoke other SSH related command, for example to copy file using `scp` scp -i {{.SSHKey}} src {{.SSHUser}}@{{.SSHHost}}:{{.SSHPort}}/dst * all: add magic command "#require:" Magic word `#require:` will ensure that the next statement will always executed when its skipped with start number. For example, given following script with line number 1: #require: 2: echo a 3: echo b 4: #require: 5: echo c ``` executing `awwan local script.aww 3`, will always execute line number 2 `echo a`, but not line number 5 (because its before line start 3). === Bug fixes * command: change the owner of file when doing #get! In case the owner of file is not active user and it does not have read permission, the "#get!" command will fail when copying command from remote to local. * command: fix magic copy and get command on templates === Enhancements * command: merge sequences of spaces on command into single space * command: check for single, double, or back quote on command Previously, if command contains quote like, echo "a b" the script will run it as ["echo", `"a`, `b"`] which is not what we will expected and may cause some command failed to run. This changes fix the parsing of command string by detecting possible quote. --- CHANGELOG.adoc | 2 +- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index fae9526..802aa91 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -1,6 +1,6 @@ = Changelog for awwan -== awwan 0.2.0 (2020.06.xx) +== awwan 0.2.0 (2020.07.05) === New features diff --git a/go.mod b/go.mod index cef2796..458ebe0 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,6 @@ module git.sr.ht/~shulhan/awwan go 1.13 -require github.com/shuLhan/share v0.16.1-0.20200615074640-85bc10a78afa +require github.com/shuLhan/share v0.17.0 //replace github.com/shuLhan/share => ../share diff --git a/go.sum b/go.sum index 561766e..26dd841 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/shuLhan/share v0.16.1-0.20200615074640-85bc10a78afa h1:/QcCE2yH37qc3Qr5ttW4wZPZp8C/3YHiYRrd8gSgjqg= -github.com/shuLhan/share v0.16.1-0.20200615074640-85bc10a78afa/go.mod h1:FqPloTQlDTAmMXxaWft/V5tPmxEHBJeyJMAzVm4/1og= +github.com/shuLhan/share v0.17.0 h1:S7PpkWdp+BZVGHNU0wmUmhybvVwDp7jiQSBYeBpPBS0= +github.com/shuLhan/share v0.17.0/go.mod h1:FqPloTQlDTAmMXxaWft/V5tPmxEHBJeyJMAzVm4/1og= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed h1:g4KENRiCMEx58Q7/ecwfT0N2o8z35Fnbsjig/Alf2T4= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -- cgit v1.3