kingdonb / simplest-commitbee

Simplest commits-to/beeminder integration (roughly implements):
https://github.com/commitsto/commits.to/wiki#simple-beeminder-integration
MIT License
5 stars 0 forks source link

!/usr/bin/env bash

BE='bundle exec'

RU='rvm'

RVM_ENVIR=/etc/profile.d/rvm.sh

RUBY_VERS=cat .ruby-version

This should be a "do-more" goal with kyoom enabled (default settings)

API="https://www.beeminder.com/api/v1" GOAL="simplest-commitsto" JSON="goals/$GOAL/datapoints.json" USER="${BEEMINDER_USERNAME}" TOKEN="auth_token=${BEE_AUTH_TOKEN}"

curl -s "$API/users/$USER/$JSON?$TOKEN" > "${GOAL}.json"

echo "Fetched ${GOAL}.json"

exit 0

. $RVM_ENVIR

$RU $RUBY_VERS

$BE ruby ./cli sync

deis_token(){ cat ~/.deis/client.json |jq .token -r ; }

curl https://deis.xyz/v2/apps/simplest-commitbee/builds/ -H "Authorization: token $(deis_token)"

curl -X POST https://deis.team.hephy.rocks/v2/apps/simplest-commitbee/builds/ \

-H "Authorization: token $(deis_token)" \

-H "Content-Type: application/json" \

-d '{ "image": "kingdonb/simplest-commitbee:latest", "dockerfile": "false",

"procfile": { "cron": "./README; sleep $((15 60 4 * 4))" } }'