Bug 766408 - 1. Client workflow automation - update local spec to latest revision from server
Summary: 1. Client workflow automation - update local spec to latest revision from server
Keywords:
Status: CLOSED DUPLICATE of bug 796009
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Joshua Wulf
QA Contact:
URL:
Whiteboard:
Depends On: 766406
Blocks: 766412
TreeView+ depends on / blocked
 
Reported: 2011-12-12 01:16 UTC by Joshua Wulf
Modified: 2014-10-19 22:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-23 08:31:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Joshua Wulf 2011-12-12 01:16:48 UTC
Here's a script to update your local content spec to the latest revision from the server:

#!/bin/bash

SKYNETCLIENTCMD="java -jar /home/jwulf/Skynet/skynet.jar"
DIR=`pwd`
CONFFILE=csprocessor.cfg

  if [ ! -f $CONFFILE ]
  then
    echo "Cannot find $CONFFILE. Exiting."
    exit 2
  else
    source $CONFFILE
  fi

  if [ -z "$SPECID" ]
  then 
     echo "Please set a value for SPECID in $CONFFILE"
     exit 3
  fi
  
  if [ -z "$SPECNAME" ]
  then 
     echo "Please set a value for SPECNAME in $CONFFILE"
     exit 3
  fi

$SKYNETCLIENTCMD pull -c $SPECID --post -o post-$SPECNAME.spec

Comment 1 Joshua Wulf 2011-12-12 01:20:26 UTC
This requires the csprocessor.cfg file described in bug 766406 (dependency of this bug).

Put the script above into something like ~/skynet/refreshlocal
Edit the SKYNETCLIENTCMD to point to your local skynet client
Make it executable with "chmod 755 refreshlocal"
Put an alias in ~/.bashrc:
  Something like: alias refreshlocal='~/skynet/refreshlocal'
Run "source ~/.bashrc"

Now just run "refreshlocal" where your csprocessor.cfg file is located, and it will overwrite your local content spec with the latest from the server. 

You should run this after pushing an updated spec to the server, to get the latest revision number. 

***WARNING***

If you push a modified content spec and it fails, then running "refreshlocal" will overwrite your local changes. Be aware of this, and make sure that the push was successful before you run this command.

Comment 2 Joshua Wulf 2012-02-20 08:20:39 UTC
#!/bin/bash

# Updated for cspclient-package-provided csprocessor 

SKYNETCLIENTCMD=csprocessor
DIR=`pwd`
CONFFILE=csprocessor.cfg

  if [ ! -f $CONFFILE ]
  then
    echo "Cannot find $CONFFILE. Exiting."
    exit 2
  else
    source $CONFFILE
  fi

  if [ -z "$SPECID" ]
  then 
     echo "Please set a value for SPECID in $CONFFILE"
     exit 3
  fi

  if [ -z "$SPECNAME" ]
  then 
     echo "Please set a value for SPECNAME in $CONFFILE"
     exit 3
  fi

$SKYNETCLIENTCMD pull -c $SPECID --post -o post-$SPECNAME.spec

Comment 3 Joshua Wulf 2012-03-23 08:31:10 UTC
Implemented by 796009

*** This bug has been marked as a duplicate of bug 796009 ***


Note You need to log in before you can comment on or make changes to this bug.