about summary refs log tree commit diff stats
path: root/post.sh
blob: 9ad6292e26c473d55f57c73e53cba1e2c90c5275 (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
25
26
27
28
#!/bin/sh

set -eu

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

# TAR up the program.                                                          #
bsdtar -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 $DSCIP_NAME
cd $DSCIP_NAME
mkdir $CURRENT_COMMIT
cd $CURRENT_COMMIT
mkdir $(uname)
cd $(uname)
put $DSCIP_NAME-$(uname)-$(uname -r)_$(uname -m)-$CURRENT_COMMIT.tar.xz
put $WORKING_DIRECTORY/output.txt output-success.txt
close
bye
EOF

exit 0