From f034df937dced65c122868fe3ff5f42a76f0dbb0 Mon Sep 17 00:00:00 2001 From: Christopher Young Date: Sun, 28 Feb 2016 12:03:28 -0500 Subject: [PATCH] Use CircleCI only as a signal for build process. --- circle.yml | 2 +- selfupdate/process_builds.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 selfupdate/process_builds.sh diff --git a/circle.yml b/circle.yml index 08a44595..77ae827b 100644 --- a/circle.yml +++ b/circle.yml @@ -17,4 +17,4 @@ deployment: production: branch: master commands: - - cd selfupdate ; ./makeupdate.sh ; cd .. ; yes | scp -i ~/.ssh/id_updates.stratux.me work/*.sh stratux-updates@updates.stratux.me:. + - yes | ssh -i ~/.ssh/id_updates.stratux.me stratux-updates@updates.stratux.me "touch queue/`git log -n 1 --pretty=%H`" diff --git a/selfupdate/process_builds.sh b/selfupdate/process_builds.sh new file mode 100755 index 00000000..c665e3f3 --- /dev/null +++ b/selfupdate/process_builds.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +ssh -i ~/.ssh/id_rsa.updates stratux-updates@updates.stratux.me 'ls -1 queue/' | while read git_hash ; do + echo "***** Building $git_hash. *****" + git clone https://github.com/cyoung/stratux --recursive $git_hash + cd $git_hash + git reset --hard $git_hash + cd selfupdate + ./makeupdate.sh + cd .. + scp -i ~/.ssh/id_rsa.updates work/update*.sh stratux-updates@updates.stratux.me:finished/ + cd .. + ssh -i ~/.ssh/id_rsa.updates stratux-updates@updates.stratux.me "rm -f queue/${git_hash}" +done \ No newline at end of file