about summary refs log tree commit diff stats
path: root/post.sh
blob: 8d5404bba7d565bad045fe3703a8087c55442b37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -eu

# Execute commands after building. Like pushing to an FTP server.              #
# Example below. #

# TAR up the program.                                                          #
bsdtar --options xz:compression-level=9 -a -cf \
$DSCIP_NAME-$(uname)-$(uname -r)_$(uname -m)-$CURRENT_COMMIT.tar.xz 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 $DSCIP_NAME-$(uname)-$(uname -r)_$(uname -m)-$CURRENT_COMMIT.tar.xz $DSCIP_NAME-$(uname)-$(uname -r)_$(uname -m)-$CURRENT_COMMIT.tar.xz
put $WORKING_DIRECTORY/output.txt output-$CURRENT_COMMIT.txt
close
bye
EOF

exit 0