<feed xmlns='http://www.w3.org/2005/Atom'>
<title>awwan/script_example_test.go, branch dev</title>
<subtitle>Configuration management software, scriptable shell with SSH support.</subtitle>
<id>http://git.kilabit.info/awwan/atom?h=dev</id>
<link rel='self' href='http://git.kilabit.info/awwan/atom?h=dev'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/'/>
<updated>2023-11-11T11:37:15Z</updated>
<entry>
<title>script: respect spaces when joining multi lines command</title>
<updated>2023-11-11T11:37:15Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-10T08:07:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=d8b7a4e509a641ea2949646c5a3577bc848fea30'/>
<id>urn:sha1:d8b7a4e509a641ea2949646c5a3577bc848fea30</id>
<content type='text'>
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".
</content>
</entry>
<entry>
<title>all: tag all unit test files with "!integration"</title>
<updated>2023-10-11T18:40:22Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-10-11T17:19:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=6b756d144c5cdb0a0c9b5f8a70b3c936a75f28c9'/>
<id>urn:sha1:6b756d144c5cdb0a0c9b5f8a70b3c936a75f28c9</id>
<content type='text'>
This will allow us to build test binary that contains only "integration"
build constraints.
The test that have "integration" will be run using container.
</content>
</entry>
<entry>
<title>all: make .Vars, .Val, and .Vals panic if values is empty</title>
<updated>2023-09-26T17:54:10Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-09-26T17:01:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=d1b393b0d4ca75c8d81d051a332597b7aa3f0ab0'/>
<id>urn:sha1:d1b393b0d4ca75c8d81d051a332597b7aa3f0ab0</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>all: merge some functions into NewScript and ParseScript</title>
<updated>2023-09-23T14:52:48Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-09-23T14:52:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=b91779462ac492d237ed89bd631ffa74aa8be03f'/>
<id>urn:sha1:b91779462ac492d237ed89bd631ffa74aa8be03f</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>all: implement reading encrypted awwan environment ".awwan.env.vault"</title>
<updated>2023-09-21T19:43:21Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-09-21T19:43:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=f720644d0baaaf91e41b2e0374437d5d1e70dd9a'/>
<id>urn:sha1:f720644d0baaaf91e41b2e0374437d5d1e70dd9a</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>all: clean up codes</title>
<updated>2022-08-01T16:00:11Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-08-01T16:00:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=70799d835b68a32db97843fe0c26ae0055adbacf'/>
<id>urn:sha1:70799d835b68a32db97843fe0c26ae0055adbacf</id>
<content type='text'>
Replace ":=" with explicit variable declaration with types for clarity
and minimizing duplicate variables.
</content>
</entry>
<entry>
<title>all: change the awwan software license to GPL 3.0 or later</title>
<updated>2022-03-13T17:18:56Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2022-03-13T17:18:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=6b520faae6ae425b1bb76c516bdc68b06dd5096f'/>
<id>urn:sha1:6b520faae6ae425b1bb76c516bdc68b06dd5096f</id>
<content type='text'>
See https://kilabit.info/journal/2022/gpl for more information.
</content>
</entry>
<entry>
<title>all: rewrite the Session and Script using Statement</title>
<updated>2021-08-22T10:23:15Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-08-11T09:56:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=db5c26d8f61aa0fedc5854b649f7914054397a81'/>
<id>urn:sha1:db5c26d8f61aa0fedc5854b649f7914054397a81</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>all: rewrite the join statements function on Script</title>
<updated>2021-08-09T03:38:22Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-08-08T19:08:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=55dc6814275bb1a0e1df1d513ceb772716944f22'/>
<id>urn:sha1:55dc6814275bb1a0e1df1d513ceb772716944f22</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>all: refactoring the code</title>
<updated>2021-08-09T03:38:22Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2021-08-08T16:30:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=48c1cd3d6700bd13dc1ac8f9ad0c2b655e30e570'/>
<id>urn:sha1:48c1cd3d6700bd13dc1ac8f9ad0c2b655e30e570</id>
<content type='text'>
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.
</content>
</entry>
</feed>
