Skip to content

Instantly share code, notes, and snippets.

@jollychang
Created March 13, 2012 07:55
Show Gist options
  • Save jollychang/2027508 to your computer and use it in GitHub Desktop.
Save jollychang/2027508 to your computer and use it in GitHub Desktop.
svn diff files for selecting robotframework-seleniumlibrary tags
echo $SVN_REVISION
svn_last_successful_build_revision=`curl $JOB_URL'lastSuccessfulBuild/api/json' | python -c 'import json,sys;obj=json.loads(sys.stdin.read());print obj["'"changeSet"'"]["'"revisions"'"][0]["'"revision"'"]'`
diff=`svn di -r$SVN_REVISION:$svn_last_successful_build_revision --summarize`
files=`echo $diff | awk '{print $2}'`
tag=""
for tag in music book movie ;do if echo "$files" | grep -q $tag; then tags=$tags" -i "$tag; fi; done
echo $tags
echo $SVN_REVISION
svn_last_successful_build_revision=`curl $JOB_URL'lastSuccessfulBuild/api/json' | python -c 'import json,sys;obj=json.loads(sys.stdin.read());print obj["'"changeSet"'"]["'"revisions"'"][0]["'"revision"'"]'`
diff=`svn di -r$SVN_REVISION:$svn_last_successful_build_revision --summarize`
files=`echo $diff | awk '{print $2}'`
tag=""
for tag in py ;do if echo "$files" | grep -q $tag; then pylint_flag='yes'; fi; done
echo $pylint_flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment