diff options
Diffstat (limited to 'post.sh')
-rwxr-xr-x | post.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/post.sh b/post.sh index 1d048f9..93b324e 100755 --- a/post.sh +++ b/post.sh @@ -1,5 +1,23 @@ #!/bin/sh -# Execute commands after building. Like pushing to an FTP server. # +set -eu + +# Execute commands after building. Like pushing to an FTP server. # +# Example below. # + +# TAR up the program. # +bsdtar -a -cf program-$CURRENT_COMMIT.tar.gz app/ + +# Send the artifacts to an FTP server. # +ftp -in <<EOF +open 192.168.255.255 +user username p@ssw0rd +mkdir $CURRENT_COMMIT +cd $CURRENT_COMMIT +put program-$CURRENT_COMMIT.tar.gz program-$CURRENT_COMMIT.tar.gz +put $WORKING_DIRECTORY/output.txt $CURRENT_COMMIT-output.txt +close +bye +EOF exit 0 |