| Age | Commit message (Collapse) | Author |
|
If a multi lines command does not have spaces or have multiple
spaces, join them as is.
For example,
a\
b
should return the value as "ab", while
a \
b
should return "a b".
|
|
This will allow us to build test binary that contains only "integration"
build constraints.
The test that have "integration" will be run using container.
|
|
This is to prevent copying or executing command with value that are
not defined or typo which make the result empty and may result in
undefined behaviour.
For example if we have "app_dir = /data/app" and command in the script
that remove that directory recursively,
sudo rm -r {{.Val "::app_dir}}/bin
will result removing "/bin" entirely.
|
|
Previously, we have NewScriptForLocal, NewScriptForRemote,
ParseScriptForLocal, and ParseScriptForRemote.
Since script for local and remote actually the same and since we remove
applying environment variables at 858c26d3d940 on local, we can merge
them into NewScript and ParseScript.
|
|
Upon executing "local" or "play" comman, awwan now read the encrypted
environment file .awwan.env.vault.
The encrypted environment file is generated using "awwan encrypt" command.
|
|
Replace ":=" with explicit variable declaration with types for clarity
and minimizing duplicate variables.
|
|
See https://kilabit.info/journal/2022/gpl for more information.
|
|
The idea for rewrite is to separate between local and remote script, so
we can apply environment variables to local script. We also parse and
validate each statements before being executed to simplify the code.
|
|
Some enhancements and fixes,
* Trim the spaces on each statement before checking for continued line
* Trim the spaces on continued line
* Set the empty lines to nil, to minimize memory usage
|
|
Previously we have Command, environment, and script types to handle
all functionalities. The name for Command is kind a misleading, because
it contains method to copy files in local or remote and to execute
script in local or remote.
This refactoring break down the types into Awwan, Session, and Script.
Awwan contains cache of sessions and cache of environment files.
Session manage and cache SSH client and list of scripts.
One session have one SSH client, but may contains more than one script.
Script define the content of ".aww" file, line by line.
|
|
This type is not usable if its exported. So, let unexport them to let
user focus on Command.
|
|
A good library is the one that return an error when something happened,
not immediately stop the program.
I made a mistake and I learn from it.
|
|
This change remove the command mode "bootstrap" and replace default
environment file from "env.ini" to "awwan.env".
|
|
awwan is command line interface to configurate and manage remote system
through SSH connection.
|