summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2017-02-26 16:49:26 -0800
committerMichael Pavone <pavone@retrodev.com>2017-02-26 16:49:26 -0800
commit8eaa969d96dacde5119fe516aa35da4004091246 (patch)
tree24e3edc6b540884cbfa1557154e194f5e807840e
parent3901ec23c0be871e544c03a61d2efc8789456e60 (diff)
Fun untested changes for uploading nightly builds
-rwxr-xr-xbuild_nightly2
-rwxr-xr-xbuild_release2
-rwxr-xr-xbuild_upload_nightly15
3 files changed, 19 insertions, 0 deletions
diff --git a/build_nightly b/build_nightly
index 332ec0c..3bea61e 100755
--- a/build_nightly
+++ b/build_nightly
@@ -1,5 +1,7 @@
#!/bin/sh
+set -e
+
build_user=$1
if [ $USER != $build_user ]; then
su $build_user -c "$0 $@";
diff --git a/build_release b/build_release
index cb85c39..f79c591 100755
--- a/build_release
+++ b/build_release
@@ -68,7 +68,9 @@ cp glew/LICENSE.txt "$dir"/GLEW-LICENSE$txt
if [ $OS = "Windows" ]; then
rm -f "${dir}.zip"
zip -r "${dir}.zip" "$dir"
+ echo "${dir}.zip"
else
rm -f "${dir}.tar.gz"
tar -cvzf "${dir}.tar.gz" "$dir"
+ echo "${dir}.tar.gz"
fi
diff --git a/build_upload_nightly b/build_upload_nightly
new file mode 100755
index 0000000..3f78e0a
--- /dev/null
+++ b/build_upload_nightly
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+name=$1
+source $HOME/$name.params
+lxc-start -n "$CONTAINER_NAME"
+if [ $? -ne 0]; then
+ exit $?
+fi
+build_output=$(lxc-attach -n "$CONTAINER_NAME" -- /home/$BUILD_USER/blastem/build_nightly > /tmp/build_${name}_out.log)
+if [ $? -ne 0]; then
+ exit $?
+fi
+source $HOME/remote.params
+artifact=$(tail -n 1 /tmp/build_${name}_out.log)
+echo $REMOTE_PASS | scp "$artifact" $REMOTE_USER@$REMOTE_HOST:/home/$REMOTE_USER/nightlies