aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPeter Wilmott <p@p8952.info>2015-03-21 19:14:59 +0000
committerPeter Wilmott <p@p8952.info>2015-03-21 19:14:59 +0000
commita3f5c572716a481b7dcc0f9dcc45179a5b00bc02 (patch)
treeed7443edfb96afc14b476701aa1348159ddc0b92 /bin
parentChange the format used to store log files on disk. (diff)
downloadruby-tinderbox-a3f5c572716a481b7dcc0f9dcc45179a5b00bc02.tar.gz
ruby-tinderbox-a3f5c572716a481b7dcc0f9dcc45179a5b00bc02.tar.bz2
ruby-tinderbox-a3f5c572716a481b7dcc0f9dcc45179a5b00bc02.zip
Bring build scripts and web interface inline with 7266717147d
In addition to brining the build scripts inline with 7266717147d7998b86386f3e73667f0460b2a57a this change also removes the "Passed / Passed" format from the repoman page. This is to bring it inline with the style of the builds page and prepare for the new layout of hypothetical packages.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman.sh6
-rwxr-xr-xbin/tinder.sh16
2 files changed, 8 insertions, 14 deletions
diff --git a/bin/repoman.sh b/bin/repoman.sh
index 060d48e..25d36b1 100755
--- a/bin/repoman.sh
+++ b/bin/repoman.sh
@@ -21,12 +21,10 @@ function REPOMAN() {
repoman scan || true
repoman manifest
repoman full > /tmp/repoman_log_current || true
- echo $? > /tmp/repoman_result_current
sed -i -e "/^USE_RUBY/s/$CURR_TARGET/$CURR_TARGET $NEXT_TARGET/" "$NAME-$VERSION.ebuild"
repoman manifest
repoman full > /tmp/repoman_log_next || true
- echo $? > /tmp/repoman_result_next
LOG
}
@@ -38,18 +36,14 @@ function LOG() {
mkdir -p "$SCRIPT_DIR/ci-logs/$SHA1/next_target/repomans/$DATE"
cp /tmp/repoman_log_current "$SCRIPT_DIR/ci-logs/$SHA1/current_target/repomans/$DATE/repoman_log"
- cp /tmp/repoman_result_current "$SCRIPT_DIR/ci-logs/$SHA1/current_target/repomans/$DATE/repoman_result"
cp /tmp/repoman_log_next "$SCRIPT_DIR/ci-logs/$SHA1/next_target/repomans/$DATE/repoman_log"
- cp /tmp/repoman_result_next "$SCRIPT_DIR/ci-logs/$SHA1/next_target/repomans/$DATE/repoman_result"
chmod 755 -R "$SCRIPT_DIR/ci-logs"
}
function CLEANUP() {
rm /tmp/repoman_log_current
- rm /tmp/repoman_result_current
rm /tmp/repoman_log_next
- rm /tmp/repoman_result_next
rm -r "$SCRIPT_DIR/overlay"
}
diff --git a/bin/tinder.sh b/bin/tinder.sh
index eb6d383..4116fa8 100755
--- a/bin/tinder.sh
+++ b/bin/tinder.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -o errexit -o nounset -o pipefail
-[[ $(whoami) == 'root' ]] || exit 1
+[[ $(whoami) == "root" ]] || exit 1
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
function ENV_SETUP() {
@@ -55,16 +55,16 @@ function LOG() {
if [[ $1 == 0 ]]; then
RESULT="\e[0;32mBUILD SUCCEEDED\e[0m"
- touch "$SCRIPT_DIR/ci-logs/$SHA1/$TYPE/builds/$DATE/succeeded"
+ echo "succeeded" > "$SCRIPT_DIR/ci-logs/$SHA1/$TYPE/builds/$DATE/result"
elif [[ $1 == 1 ]]; then
RESULT="\e[0;31mBUILD FAILED\e[0m"
- touch "$SCRIPT_DIR/ci-logs/$SHA1/$TYPE/builds/$DATE/failed"
+ echo "failed" > "$SCRIPT_DIR/ci-logs/$SHA1/$TYPE/builds/$DATE/result"
elif [[ $1 == 124 ]]; then
RESULT="\e[0;31mBUILD TIMED OUT\e[0m"
- touch "$SCRIPT_DIR/ci-logs/$SHA1/$TYPE/builds/$DATE/timedout"
+ echo "timed out" > "$SCRIPT_DIR/ci-logs/$SHA1/$TYPE/builds/$DATE/result"
else
RESULT="\e[0;31mBUILD UNKNOWN\e[0m"
- touch "$SCRIPT_DIR/ci-logs/$SHA1/$TYPE/builds/$DATE/unknown"
+ echo "unknown" > "$SCRIPT_DIR/ci-logs/$SHA1/$TYPE/builds/$DATE/result"
fi
chmod 755 -R "$SCRIPT_DIR/ci-logs/$SHA1/$TYPE/builds/$DATE"
@@ -82,20 +82,20 @@ ENV_SETUP
PKG_ARR=($(qatom $1))
CATEGORY="${PKG_ARR[0]}"
NAME="${PKG_ARR[1]}"
-if [[ ${PKG_ARR[3]:=foo} == 'foo' ]]; then
+if [[ ${PKG_ARR[3]:=foo} == "foo" ]]; then
VERSION="${PKG_ARR[2]}"
else
VERSION="${PKG_ARR[2]}-${PKG_ARR[3]}"
fi
if [[ $# -eq 1 ]]; then
- TYPE='current_target'
+ TYPE="current_target"
PACKAGE=$1
SETUP
EMERGE
CLEANUP
elif [[ $# -eq 3 ]]; then
- TYPE='next_target'
+ TYPE="next_target"
PACKAGE=$1
CURR_TARGET=$2
NEXT_TARGET=$3