about summary refs log tree commit diff stats
path: root/post.sh
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-07-16 21:53:48 -0400
committerCharadon <dev@iotib.net>2022-07-16 21:53:48 -0400
commitc554c86a6ae091b15f41b97b682f574477d4bdd4 (patch)
tree0c7fdf6dd3ce7649cc08b256ea275e2db1117652 /post.sh
parentc9a15281b7328742a59c46eb3171754ce9e30bff (diff)
downloaddscip-c554c86a6ae091b15f41b97b682f574477d4bdd4.tar.gz
Removed chroot support as that's out of scope of the project
Diffstat (limited to 'post.sh')
-rwxr-xr-xpost.sh20
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