Page MenuHomeDevCentral

arc-update-repo
ActivePublic

Authored by dereckson on Jul 7 2015, 08:20.
Referenced Files
F4045: arc-update-repo
Jul 7 2015, 08:22
F4044: arc-update-repo.sh
Jul 7 2015, 08:20
Subscribers
None
#!/bin/sh
# Gets repository root directory
ROOT_DIR=`git rev-parse --show-toplevel 2>/dev/null`
if [ "$?" -ne "0" ]; then
ROOT_DIR=`hg root 2>/dev/null`
if [ "$?" -ne "0" ]; then
echo "Doesn't seen to be a Git or Mercurial repository."
exit
fi
fi
# Gets repository callsign from .arcconfig
if [ ! -f $ROOT_DIR/.arcconfig ]; then
echo 'Create a .arcconfig file with "repository.callsign" : "..." (without the leading r) option.'
exit
fi
CALLSIGN=`cat $ROOT_DIR/.arcconfig | jq '."repository.callsign"'`
if [ "$CALLSIGN" = "null" ]; then
echo 'Add to your .arcconfig file a "repository.callsign" : "..." (without the leading r) option.'
exit
fi
# Calls conduit
echo '{ "callsigns": [' $CALLSIGN '] }' | arc call-conduit diffusion.looksoon > /dev/null

Event Timeline

dereckson changed the title of this paste from untitled to arc-update-repo.sh.
dereckson updated the paste's language from autodetect to autodetect.

Allows to notify DevCentral repository should be updated.

dereckson changed the title of this paste from arc-update-repo.sh to arc-update-repo.
dereckson updated the paste's language from autodetect to bash.
dereckson added a project: DevCentral.