#!/usr/bin/env bash
DIR=`dirname $0`
BIN=$DIR/../node_modules/.bin

if $DIR/konrad --run; then

    if $DIR/konrad --test; then
        $DIR/commit "$*"
        
        set -e
        
        VERSION=`$BIN/sds version`
        
        echo 'npm publish' | $BIN/colorcat -swd
        npm publish 2>&1   | $BIN/colorcat -sP $DIR/../cc/npm.noon
    fi
fi
