aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.adoc28
-rw-r--r--awwan.go2
-rw-r--r--cmd/awwan/main.go15
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.
diff --git a/awwan.go b/awwan.go
index af16608..841a880 100644
--- a/awwan.go
+++ b/awwan.go
@@ -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)
}