-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
18 lines (16 loc) · 1.24 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
language: bash
before_script:
- git clone https://github.com/shsdk/shcf.git
## Initialize 'shcf' (cannot use usual initialize as it will create a subshell, falling travis into an endless loop)
- export SHCF_PLATFORM_ROOT=/home/travis/build/icasimpan/shcf/shcf/core; $SHCF_PLATFORM_ROOT/bin/shcf_cli new hello_world
## Now, use 'shcf_cli lib' to create the function greeter()
- $SHCF_PLATFORM_ROOT/bin/shcf_cli lib hello_world greeter
- sed -i '/function/d' /home/travis/build/icasimpan/shcf/shcf/projects/hello_world/lib/greeter.bash.inc
- sed -i "s/.*END.*/echo 'Hello World\!'; \}/" /home/travis/build/icasimpan/shcf/shcf/projects/hello_world/lib/greeter.bash.inc
- sed -i '/"/d' /home/travis/build/icasimpan/shcf/shcf/projects/hello_world/lib/greeter.bash.inc
## Insert greeter() into bin/hello_world
- sed -i 's/rename_function1/greeter/g' /home/travis/build/icasimpan/shcf/shcf/projects/hello_world/bin/hello_world
- sed -i '/rename_function/d' /home/travis/build/icasimpan/shcf/shcf/projects/hello_world/bin/hello_world
- echo "greeter" >> /home/travis/build/icasimpan/shcf/shcf/projects/hello_world/bin/hello_world
script:
- bash /home/travis/build/icasimpan/shcf/shcf/projects/hello_world/bin/hello_world