Only commit docs for non-PR branches because permissions (#246)

* attempt to skip doc generation on pull request branches

* try different commenting style

* Generate docs from job=validate_atomics_generate_docs branch=circle-for-forks
This commit is contained in:
Brian Beyer
2018-06-11 08:20:56 -05:00
committed by GitHub
parent fbe0cfdb93
commit e1eb70b602
2 changed files with 8 additions and 6 deletions
+5 -3
View File
@@ -36,13 +36,15 @@ jobs:
if git diff-index --quiet HEAD -- ; then
echo "Not committing documentation because there are no changes"
elif [[ "${CIRCLE_BRANCH}" == "master" ]]; then
echo "Not committing documentation because we are on master and doc changes should be part of pull request branches"
#elif [[ "${CIRCLE_BRANCH}" == "master" ]]; then
# echo "Not committing documentation because we are on master and doc changes should be part of pull request branches"
elif [[ $(echo "$CIRCLE_BRANCH" | grep -c "pull") -gt 0 ]]; then
echo "Not committing documentation because we are on a pull request branch that we don't have push permissions to"
else
git config credential.helper 'cache --timeout=120'
git config user.email "<email>"
git config user.name "CircleCI Atomic Red Team doc generator"
git add atomics
git commit -am "Generate docs from job=$CIRCLE_JOB branch=$CIRCLE_BRANCH"
git push -u origin $CIRCLE_BRANCH
+3 -3
View File
@@ -45,9 +45,9 @@ dir /s c:\ >> %temp%\download
dir /s "c:\Documents and Settings" >> %temp%\download
dir /s "c:\Program Files\" >> %temp%\download
dir /s d:\ >> %temp%\download
dir "%systemdrive%\Users\*.*"
dir "%userprofile%\AppData\Roaming\Microsoft\Windows\Recent\*.*"
dir "%userprofile%\Desktop\*.*"
dir "%systemdrive%\Users\*.*" >> %temp%\download
dir "%userprofile%\AppData\Roaming\Microsoft\Windows\Recent\*.*" >> %temp%\download
dir "%userprofile%\Desktop\*.*" >> %temp%\download
tree /F >> %temp%\download
```
<br/>