diff options
| author | Shulhan <ms@kilabit.info> | 2021-06-09 16:06:19 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-06-09 16:06:19 +0700 |
| commit | f3a2265feeaffc31fc9d7e1d1b7f12107140a33e (patch) | |
| tree | 4a8cb8772896f045fa3ec7188ea2e42378d22b61 | |
| parent | 5b7e73734ad45a265381bfceee6bbcf5db76ca40 (diff) | |
| download | awwan-f3a2265feeaffc31fc9d7e1d1b7f12107140a33e.tar.xz | |
Release awwan 0.3.0 (2021.06.09)v0.3.0
* go.mod: set the minimum Go to 1.16 and update to share module v0.25.1
=== Enhancements
* cmd/awwan: print the awwan version on command usage output
* all: check and return an error if start index is out of range
* all: log error when executing script (local or play)
* all: do not load SSH config if command mode is "local"
If the mode is local there is no need to parse and load the SSH config,
since the command to be executed will run on local machine anyway.
* all: set base dir based on the first .ssh directory that we found
Previously, the base directory is set on current working directory.
This limit the way to execute awwan only from the directory
that contains the .ssh directory.
This changes set the environment BaseDir based on the first .ssh
directory that we found from script path up to the "/". So, user can
execute awwan script from any sub-directories.
| -rw-r--r-- | CHANGELOG.adoc | 28 | ||||
| -rw-r--r-- | awwan.go | 2 | ||||
| -rw-r--r-- | cmd/awwan/main.go | 15 |
3 files changed, 41 insertions, 4 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 75a945c..2842892 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -1,5 +1,33 @@ = Changelog for awwan +== awwan 0.3.0 (2021.06.09) + +* go.mod: set the minimum Go to 1.16 and update to share module v0.25.1 + +=== Enhancements + +* cmd/awwan: print the awwan version on command usage output + +* all: check and return an error if start index is out of range + +* all: log error when executing script (local or play) + +* all: do not load SSH config if command mode is "local" + + If the mode is local there is no need to parse and load the SSH config, + since the command to be executed will run on local machine anyway. + +* all: set base dir based on the first .ssh directory that we found + + Previously, the base directory is set on current working directory. + This limit the way to execute awwan only from the directory + that contains the .ssh directory. + + This changes set the environment BaseDir based on the first .ssh + directory that we found from script path up to the "/". So, user can + execute awwan script from any sub-directories. + + == awwan 0.2.1 (2021.01.18) Update the share modules which bring fixes to "#put" commands. @@ -5,6 +5,8 @@ package awwan const ( + Version = "0.3.0" + modeLocal = "local" modePlay = "play" diff --git a/cmd/awwan/main.go b/cmd/awwan/main.go index c8fa3e7..da02b23 100644 --- a/cmd/awwan/main.go +++ b/cmd/awwan/main.go @@ -85,12 +85,18 @@ func parseArgScriptEnd(in string) (out int, err error) { } func usage() { - log.Println(` -awwan <command> <script> <start> [end] + log.Printf(` += awwan v%s + +== USAGE + + awwan <command> <script> <start> [end] + +== OPTIONS command = "local" / "play" The local command execute the script in current system. - The play command execute the script in the remove server. + The play command execute the script in the remote server. script = STRING A path to script to be executed. @@ -100,7 +106,8 @@ start = 1*DIGITS end = 1*DIGITS / "-" The end of line number, default to start. The "-" means until the - last line`) + last line. +`, awwan.Version) os.Exit(1) } |
